pkgsStatic: propagate all buildInputs
This commit is contained in:
parent
e06b7d9638
commit
bb71bb15ce
|
@ -65,6 +65,18 @@ rec {
|
||||||
static = true;
|
static = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Modify a stdenv so that all buildInputs are implicitly propagated to
|
||||||
|
consuming derivations
|
||||||
|
*/
|
||||||
|
propagateBuildInputs = stdenv: stdenv //
|
||||||
|
{ mkDerivation = args: stdenv.mkDerivation (args // {
|
||||||
|
propagatedBuildInputs = (args.propagatedBuildInputs or []) ++ (args.buildInputs or []);
|
||||||
|
buildInputs = [];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Modify a stdenv so that the specified attributes are added to
|
/* Modify a stdenv so that the specified attributes are added to
|
||||||
every derivation returned by its mkDerivation function.
|
every derivation returned by its mkDerivation function.
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
|
|
||||||
self: super: let
|
self: super: let
|
||||||
inherit (super.stdenvAdapters) makeStaticBinaries
|
inherit (super.stdenvAdapters) makeStaticBinaries
|
||||||
makeStaticLibraries;
|
makeStaticLibraries
|
||||||
|
propagateBuildInputs;
|
||||||
inherit (super.lib) foldl optional flip id composeExtensions;
|
inherit (super.lib) foldl optional flip id composeExtensions;
|
||||||
inherit (super) makeSetupHook;
|
inherit (super) makeSetupHook;
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ self: super: let
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
staticAdapters = [ makeStaticLibraries ]
|
staticAdapters = [ makeStaticLibraries propagateBuildInputs ]
|
||||||
|
|
||||||
# Apple does not provide a static version of libSystem or crt0.o
|
# Apple does not provide a static version of libSystem or crt0.o
|
||||||
# So we can’t build static binaries without extensive hacks.
|
# So we can’t build static binaries without extensive hacks.
|
||||||
|
|
Loading…
Reference in a new issue