From d2972cac853a7f8367f2840a8c291cc1e7f8240e Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 13 Nov 2021 15:32:53 +0300 Subject: [PATCH 1/6] slstatus: fix cross-compilation --- pkgs/applications/misc/slstatus/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/misc/slstatus/default.nix b/pkgs/applications/misc/slstatus/default.nix index 613d2f8e78bf..5badb7f1b35a 100644 --- a/pkgs/applications/misc/slstatus/default.nix +++ b/pkgs/applications/misc/slstatus/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libX11 ]; + makeFlags = [ "CC:=$(CC)" ]; + installFlags = [ "PREFIX=$(out)" ]; meta = { From 72dbc9005ec54e47d05860122ff52c4d69b4d754 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 13 Nov 2021 15:33:17 +0300 Subject: [PATCH 2/6] wmname: fix cross-compilation --- pkgs/applications/misc/wmname/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/wmname/default.nix b/pkgs/applications/misc/wmname/default.nix index 438bd5c5d56a..45e7cf3d8f1b 100644 --- a/pkgs/applications/misc/wmname/default.nix +++ b/pkgs/applications/misc/wmname/default.nix @@ -9,9 +9,15 @@ stdenv.mkDerivation rec { sha256 = "559ad188b2913167dcbb37ecfbb7ed474a7ec4bbcb0129d8d5d08cb9208d02c5"; }; + postPatch = '' + substituteInPlace Makefile --replace "@strip" "#@strip" + ''; + buildInputs = [ libX11 ]; - preConfigure = ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk''; + makeFlags = [ "CC:=$(CC)" ]; + + installFlags = [ "PREFIX=$(out)" ]; meta = { description = "Prints or set the window manager name property of the root window"; From 396b3fc00b1b5b60c695fda01456a950a8c4d02a Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 13 Nov 2021 15:33:31 +0300 Subject: [PATCH 3/6] ii: fix cross-compilation --- pkgs/applications/networking/irc/ii/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/irc/ii/default.nix b/pkgs/applications/networking/irc/ii/default.nix index 93056ef399fb..18a9a8882fac 100644 --- a/pkgs/applications/networking/irc/ii/default.nix +++ b/pkgs/applications/networking/irc/ii/default.nix @@ -9,9 +9,9 @@ stdenv.mkDerivation rec { sha256 = "1lk8vjl7i8dcjh4jkg8h8bkapcbs465sy8g9c0chfqsywbmf3ndr"; }; - installPhase = '' - make install PREFIX=$out - ''; + makeFlags = [ "CC:=$(CC)" ]; + + installFlags = [ "PREFIX=$(out)" ]; meta = { homepage = "https://tools.suckless.org/ii/"; From 8d88d5144ac9425fe884cd114f956cbe4f2c1452 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 13 Nov 2021 15:33:45 +0300 Subject: [PATCH 4/6] sic: fix cross-compilation --- pkgs/applications/networking/irc/sic/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/irc/sic/default.nix b/pkgs/applications/networking/irc/sic/default.nix index 129b72d847d4..705fc12510db 100644 --- a/pkgs/applications/networking/irc/sic/default.nix +++ b/pkgs/applications/networking/irc/sic/default.nix @@ -4,12 +4,15 @@ stdenv.mkDerivation rec { pname = "sic"; version = "1.2"; - makeFlags = [ "PREFIX=$(out)" ]; src = fetchurl { url = "https://dl.suckless.org/tools/sic-${version}.tar.gz"; sha256 = "ac07f905995e13ba2c43912d7a035fbbe78a628d7ba1c256f4ca1372fb565185"; }; + makeFlags = [ "CC:=$(CC)" ]; + + installFlags = [ "PREFIX=$(out)" ]; + meta = { description = "Simple IRC client"; homepage = "https://tools.suckless.org/sic/"; From b1c58be1ac6ed732c4b0ef7d4781ab52d7a6a09b Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 13 Nov 2021 15:34:03 +0300 Subject: [PATCH 5/6] farbfeld: fix cross-compilation --- pkgs/development/libraries/farbfeld/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/farbfeld/default.nix b/pkgs/development/libraries/farbfeld/default.nix index 07957674bb31..3e1045ab852b 100644 --- a/pkgs/development/libraries/farbfeld/default.nix +++ b/pkgs/development/libraries/farbfeld/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { buildInputs = [ libpng libjpeg ]; nativeBuildInputs = [ makeWrapper ]; + makeFlags = [ "CC:=$(CC)" ]; + installFlags = [ "PREFIX=$(out)" ]; postInstall = '' wrapProgram "$out/bin/2ff" --prefix PATH : "${file}/bin" From 24c9cd84c2e5d244b88b805b85b20512af37325d Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 13 Nov 2021 15:34:17 +0300 Subject: [PATCH 6/6] slock: fix cross-compilation --- pkgs/misc/screensavers/slock/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/screensavers/slock/default.nix b/pkgs/misc/screensavers/slock/default.nix index 63ca76e391f4..9f364ba520cd 100644 --- a/pkgs/misc/screensavers/slock/default.nix +++ b/pkgs/misc/screensavers/slock/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ xorgproto libX11 libXext libXrandr ]; - installFlags = [ "DESTDIR=\${out}" "PREFIX=" ]; + installFlags = [ "PREFIX=$(out)" ]; postPatch = "sed -i '/chmod u+s/d' Makefile"; @@ -24,6 +24,8 @@ stdenv.mkDerivation rec { cp ${writeText "config.def.h" conf} config.def.h ''; + makeFlags = [ "CC:=$(CC)" ]; + meta = { homepage = "https://tools.suckless.org/slock"; description = "Simple X display locker";