mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
pkgsStatic: propagate all buildInputs
This commit is contained in:
parent
e06b7d9638
commit
bb71bb15ce
@ -65,6 +65,18 @@ rec {
|
||||
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
|
||||
every derivation returned by its mkDerivation function.
|
||||
|
||||
|
@ -12,7 +12,8 @@
|
||||
|
||||
self: super: let
|
||||
inherit (super.stdenvAdapters) makeStaticBinaries
|
||||
makeStaticLibraries;
|
||||
makeStaticLibraries
|
||||
propagateBuildInputs;
|
||||
inherit (super.lib) foldl optional flip id composeExtensions;
|
||||
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
|
||||
# So we can’t build static binaries without extensive hacks.
|
||||
|
Loading…
Reference in New Issue
Block a user