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" ];
nativeBuildInputs = [
autoconf automake libtool autoreconfHook
];
buildInputs = [ libuuid ] ++
stdenv.lib.optionals stdenv.isDarwin [ llvm libcxxabi libobjc ];
nativeBuildInputs = [ autoconf automake libtool autoreconfHook ];
buildInputs = [ libuuid ]
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ];
patches = [
./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch
];
patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ];
__propagatedImpureHostDeps = [
# 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;
# 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 ''
substituteInPlace cctools/Makefile.am --replace libobjc2 ""

View file

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

View file

@ -6607,7 +6607,7 @@ in
};
ccl = callPackage ../development/compilers/ccl {
inherit (darwin) bootstrap_cmds;
inherit (buildPackages.darwin) bootstrap_cmds;
};
cdb = callPackage ../development/tools/database/cdb { };
@ -9080,7 +9080,7 @@ in
jhiccup = callPackage ../development/tools/java/jhiccup { };
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; };
@ -10357,7 +10357,7 @@ in
kinetic-cpp-client = callPackage ../development/libraries/kinetic-cpp-client { };
krb5 = callPackage ../development/libraries/kerberos/krb5.nix {
inherit (darwin) bootstrap_cmds;
inherit (buildPackages.darwin) bootstrap_cmds;
};
krb5Full = krb5;
libkrb5 = krb5.override {
@ -14010,7 +14010,7 @@ in
inherit (darwin) cf-private;
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa;
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;
libdrm = if stdenv.isLinux then libdrm else null;
abiCompat = config.xorg.abiCompat # `config` because we have no `xorg.override`