Merge pull request #51881 from matthewbauer/static-fixes

pkgsStatic fix for macOS
This commit is contained in:
Matthew Bauer 2018-12-14 21:08:35 -06:00 committed by GitHub
commit 6f78e300a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 14 deletions

View File

@ -29,15 +29,11 @@ let
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
nativeBuildInputs = [ nativeBuildInputs = [ autoconf automake libtool autoreconfHook ];
autoconf automake libtool autoreconfHook buildInputs = [ libuuid ]
]; ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ];
buildInputs = [ libuuid ] ++
stdenv.lib.optionals stdenv.isDarwin [ llvm libcxxabi libobjc ];
patches = [ patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ];
./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch
];
__propagatedImpureHostDeps = [ __propagatedImpureHostDeps = [
# As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
@ -48,7 +44,9 @@ let
enableParallelBuilding = true; enableParallelBuilding = true;
# TODO(@Ericson2314): Always pass "--target" and always targetPrefix. # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; configurePlatforms = [ "build" "host" ]
++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
configureFlags = [ "--disable-clang-as" ];
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace cctools/Makefile.am --replace libobjc2 "" substituteInPlace cctools/Makefile.am --replace libobjc2 ""

View File

@ -60,7 +60,6 @@ in lib.init bootStages ++ [
++ lib.optionals ++ lib.optionals
(hostPlatform.isLinux && !buildPlatform.isLinux) (hostPlatform.isLinux && !buildPlatform.isLinux)
[ buildPackages.patchelf buildPackages.paxctl ] [ buildPackages.patchelf buildPackages.paxctl ]
++ lib.optional hostPlatform.isDarwin buildPackages.clang
++ lib.optional ++ lib.optional
(let f = p: !p.isx86 || p.libc == "musl"; in f hostPlatform && !(f buildPlatform)) (let f = p: !p.isx86 || p.libc == "musl"; in f hostPlatform && !(f buildPlatform))
buildPackages.updateAutotoolsGnuConfigScriptsHook buildPackages.updateAutotoolsGnuConfigScriptsHook

View File

@ -6607,7 +6607,7 @@ in
}; };
ccl = callPackage ../development/compilers/ccl { ccl = callPackage ../development/compilers/ccl {
inherit (darwin) bootstrap_cmds; inherit (buildPackages.darwin) bootstrap_cmds;
}; };
cdb = callPackage ../development/tools/database/cdb { }; cdb = callPackage ../development/tools/database/cdb { };
@ -9080,7 +9080,7 @@ in
jhiccup = callPackage ../development/tools/java/jhiccup { }; jhiccup = callPackage ../development/tools/java/jhiccup { };
valgrind = callPackage ../development/tools/analysis/valgrind { valgrind = callPackage ../development/tools/analysis/valgrind {
inherit (darwin) xnu bootstrap_cmds cctools; inherit (buildPackages.darwin) xnu bootstrap_cmds cctools;
}; };
valgrind-light = res.valgrind.override { gdb = null; }; valgrind-light = res.valgrind.override { gdb = null; };
@ -10357,7 +10357,7 @@ in
kinetic-cpp-client = callPackage ../development/libraries/kinetic-cpp-client { }; kinetic-cpp-client = callPackage ../development/libraries/kinetic-cpp-client { };
krb5 = callPackage ../development/libraries/kerberos/krb5.nix { krb5 = callPackage ../development/libraries/kerberos/krb5.nix {
inherit (darwin) bootstrap_cmds; inherit (buildPackages.darwin) bootstrap_cmds;
}; };
krb5Full = krb5; krb5Full = krb5;
libkrb5 = krb5.override { libkrb5 = krb5.override {
@ -14010,7 +14010,7 @@ in
inherit (darwin) cf-private; inherit (darwin) cf-private;
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa; inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa;
inherit (darwin.apple_sdk.libs) Xplugin; inherit (darwin.apple_sdk.libs) Xplugin;
bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null; inherit (buildPackages.darwin) bootstrap_cmds;
udev = if stdenv.isLinux then udev else null; udev = if stdenv.isLinux then udev else null;
libdrm = if stdenv.isLinux then libdrm else null; libdrm = if stdenv.isLinux then libdrm else null;
abiCompat = config.xorg.abiCompat # `config` because we have no `xorg.override` abiCompat = config.xorg.abiCompat # `config` because we have no `xorg.override`