nss: try to fix darwin build

This commit is contained in:
ajs124 2020-07-20 17:02:44 +02:00
parent 6760ec6c40
commit 8f925208cd

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, nspr, perl, zlib, sqlite, fixDarwinDylibNames, buildPackages, ninja }:
{ stdenv, fetchurl, nspr, perl, zlib, sqlite, darwin, fixDarwinDylibNames, buildPackages, ninja }:
let
nssPEM = fetchurl {
@ -19,7 +19,8 @@ in stdenv.mkDerivation rec {
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ninja (buildPackages.python3.withPackages (ps: with ps; [ gyp ])) ];
nativeBuildInputs = [ perl ninja (buildPackages.python3.withPackages (ps: with ps; [ gyp ])) ]
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
buildInputs = [ zlib sqlite ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
@ -53,10 +54,6 @@ in stdenv.mkDerivation rec {
patchFlags = [ "-p0" ];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace nss/coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
'';
outputs = [ "out" "dev" "tools" ];
preConfigure = "cd nss";