Skip to content

Commit

Permalink
Merge pull request #208698 from amjoseph-nixpkgs/pr/nss/ilp32
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt authored Jan 3, 2023
2 parents 789db3c + c0a40be commit b38111a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/systems/inspect.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ rec {

is32bit = { cpu = { bits = 32; }; };
is64bit = { cpu = { bits = 64; }; };
isILP32 = map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ];
isBigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; };
isLittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; };

Expand Down
6 changes: 5 additions & 1 deletion pkgs/development/libraries/nss/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ stdenv.mkDerivation rec {
runHook postBuild
'';

NIX_CFLAGS_COMPILE = "-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\" " + lib.optionalString stdenv.hostPlatform.is64bit "-DNSS_USE_64=1";
NIX_CFLAGS_COMPILE =
"-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\" "
+ lib.optionalString stdenv.hostPlatform.is64bit "-DNSS_USE_64=1"
+ lib.optionalString stdenv.hostPlatform.isILP32 " -DNS_PTR_LE_32=1" # See RNG_RandomUpdate() in drdbg.c
;

installPhase = ''
runHook preInstall
Expand Down

0 comments on commit b38111a

Please sign in to comment.