From 780956e7cf9545c334da188501b99f9d0f8fe75f Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Sun, 5 Sep 2021 10:47:17 +0200 Subject: [PATCH] sysklogd: support cross-compilation --- pkgs/os-specific/linux/sysklogd/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/os-specific/linux/sysklogd/default.nix b/pkgs/os-specific/linux/sysklogd/default.nix index af180b5e5241..78992a0f870a 100644 --- a/pkgs/os-specific/linux/sysklogd/default.nix +++ b/pkgs/os-specific/linux/sysklogd/default.nix @@ -14,6 +14,17 @@ stdenv.mkDerivation { installFlags = [ "BINDIR=$(out)/sbin" "MANDIR=$(out)/share/man" "INSTALL=install" ]; + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + ]; + + postPatch = '' + # Disable stripping during installation, stripping will be done anyway. + # Fixes cross-compilation. + substituteInPlace Makefile \ + --replace "-m 500 -s" "-m 500" + ''; + preConfigure = '' sed -e 's@-o \''${MAN_USER} -g \''${MAN_GROUP} -m \''${MAN_PERMS} @@' -i Makefile