From 1548084c3b9aad93987253e9c5aa253a4cb35476 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 10 Apr 2019 16:54:50 -0400 Subject: [PATCH 1/2] netbsd.mkDerivation: fix darwin build Fixes build of netbsd.make on darwin Fixes: aab8c7ba437d ('netbsd: add cross target') --- pkgs/os-specific/bsd/netbsd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 46bac37f4e8..7f8a623b20d 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -51,7 +51,7 @@ let AR = "${stdenv'.cc.targetPrefix or ""}ar"; CC = "${stdenv'.cc.targetPrefix or ""}cc"; - CPP = if (stdenv'.cc.isClang or false) then "clang-cpp" else "cpp"; + CPP = "${stdenv'.cc.targetPrefix or ""}cpp"; CXX = "${stdenv'.cc.targetPrefix or ""}c++"; LD = "${stdenv'.cc.targetPrefix or ""}ld"; STRIP = "${stdenv'.cc.targetPrefix or ""}strip"; From 81ab32e510fc212f26b8a265eb32261785bd2863 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 10 Apr 2019 17:35:08 -0400 Subject: [PATCH 2/2] netbsd.mkDerivation: don't supply -z relro Fixes netbsd.locale Fixes: aab8c7ba437d ('netbsd: add cross target') --- pkgs/os-specific/bsd/netbsd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 7f8a623b20d..f93ed5669d0 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -65,6 +65,8 @@ let platforms = platforms.unix; license = licenses.bsd2; }; + } // lib.optionalAttrs stdenv'.isDarwin { + MKRELRO = "no"; } // lib.optionalAttrs (stdenv'.cc.isClang or false) { HAVE_LLVM = lib.head (lib.splitString "." (lib.getVersion stdenv'.cc.cc)); } // lib.optionalAttrs (stdenv'.cc.isGNU or false) {