From 721fd040505557d894d81800e2e39657198693df Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 10 Mar 2025 00:27:54 +0100 Subject: [PATCH 1/2] xearch: fix build --- pkgs/by-name/xe/xearth/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/xe/xearth/package.nix b/pkgs/by-name/xe/xearth/package.nix index d8b096e65580..080fc275d137 100644 --- a/pkgs/by-name/xe/xearth/package.nix +++ b/pkgs/by-name/xe/xearth/package.nix @@ -17,6 +17,10 @@ stdenv.mkDerivation rec { sha256 = "bcb1407cc35b3f6dd3606b2c6072273b6a912cbd9ed1ae22fb2d26694541309c"; }; + postPatch = '' + sed -i '48i #include ' gifout.c + ''; + nativeBuildInputs = [ imake gccmakedep From 8eee198e3cc461ea84ef1d860684dd477a217e77 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 10 Mar 2025 00:29:25 +0100 Subject: [PATCH 2/2] xearch: refactor --- pkgs/by-name/xe/xearth/package.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/xe/xearth/package.nix b/pkgs/by-name/xe/xearth/package.nix index 080fc275d137..af1efc08bded 100644 --- a/pkgs/by-name/xe/xearth/package.nix +++ b/pkgs/by-name/xe/xearth/package.nix @@ -14,17 +14,16 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://xearth.org/${pname}-${version}.tar.gz"; - sha256 = "bcb1407cc35b3f6dd3606b2c6072273b6a912cbd9ed1ae22fb2d26694541309c"; + hash = "sha256-vLFAfMNbP23TYGssYHInO2qRLL2e0a4i+y0maUVBMJw="; }; - postPatch = '' - sed -i '48i #include ' gifout.c - ''; + postPatch = "sed -i '48i #include ' gifout.c"; nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ libXt libXext @@ -35,12 +34,13 @@ stdenv.mkDerivation rec { "BINDIR=bin" "MANDIR=man/man1" ]; + installTargets = [ "install" "install.man" ]; - meta = with lib; { + meta = { description = "sets the X root window to an image of the Earth"; mainProgram = "xearth"; homepage = "https://xearth.org"; @@ -49,13 +49,12 @@ stdenv.mkDerivation rec { correctly shaded for the current position of the Sun. By default, xearth updates the displayed image every five minutes. ''; - maintainers = [ maintainers.mafo ]; + maintainers = with lib.maintainers; [ mafo ]; license = { fullName = "xearth license"; url = "https://xearth.org/copyright.html"; free = true; }; - platforms = platforms.unix; + platforms = lib.platforms.unix; }; - }