From 345e777888b6293a192c6e3828acd32ba83697a2 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Tue, 1 Jun 2021 09:27:32 -0700 Subject: [PATCH] nss: Set NSS_USE_64=1 for 64-bit platforms The config script does that automatically for a few architectures [1], but on 64-bit platforms that are not listed (like riscv64) the freebl build fails. Debian always adds the USE_64=1 flag when compiling on 64-bit architectures (they use legacy make instead of gyp), and we should do that as well to fix the general problem at the cost of a mass rebuild. [1] https://hg.mozilla.org/projects/nss/file/0ef2306a623f8fcd90f094281678f3ee9e7e4738/coreconf/config.gypi#l212 [2] https://salsa.debian.org/mozilla-team/nss/-/blob/c446c61808a3a30bb0c6c62cc6628ede3f7bc205/debian/rules#L66 --- pkgs/development/libraries/nss/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix index 962204268d7..66278021bd3 100644 --- a/pkgs/development/libraries/nss/default.nix +++ b/pkgs/development/libraries/nss/default.nix @@ -106,7 +106,7 @@ in stdenv.mkDerivation rec { runHook postBuild ''; - NIX_CFLAGS_COMPILE = "-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\""; + NIX_CFLAGS_COMPILE = "-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\" " + lib.optionalString stdenv.hostPlatform.is64bit "-DNSS_USE_64=1"; installPhase = '' runHook preInstall