* 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