mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
* Function `makeStaticBinaries' that augments stdenv to produce
statically linked binaries. svn path=/nixpkgs/trunk/; revision=6787
This commit is contained in:
parent
0bacb7b00d
commit
54c158cb84
@ -104,6 +104,18 @@ rec {
|
||||
isDietLibC = true;
|
||||
};
|
||||
|
||||
# Return a modified stdenv that tries to build statically linked
|
||||
# binaries.
|
||||
makeStaticBinaries = stdenv: stdenv //
|
||||
{ mkDerivation = args: stdenv.mkDerivation (args // {
|
||||
NIX_CFLAGS_LINK = "-static";
|
||||
|
||||
configureFlags =
|
||||
(if args ? configureFlags then args.configureFlags else "")
|
||||
+ " --disable-shared"; # brrr...
|
||||
});
|
||||
};
|
||||
|
||||
# Applying this to an attribute set will cause nix-env to look
|
||||
# inside the set for derivations.
|
||||
recurseIntoAttrs = attrs: attrs // {recurseForDerivations = true;};
|
||||
|
Loading…
Reference in New Issue
Block a user