diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-03-31 15:30:47 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-03-31 15:30:47 +0000 |
commit | d27514cb28997dd9ed745bbf12a8d2f821acbbee (patch) | |
tree | 6868ce3deb5776f37d9963fe0784204020d6dfc5 /pkgs/stdenv | |
parent | 9455f37ce91c1df43109eea64e8258cab0054768 (diff) | |
parent | 1f9740e01c4da98c1a49641f2313729798fafcf3 (diff) |
* Sync with the trunk once more.
* Turn on everything in Hydra. svn path=/nixpkgs/branches/stdenv-updates/; revision=14806
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/adapters.nix | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index ff4de11bc8b70..5be18ae205ae7 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -107,5 +107,18 @@ rec { isStatic = true; } // {inherit fetchurl;}; - -} \ No newline at end of file + + /* Modify a stdenv so that the specified attributes are added to + every derivation returned by its mkDerivation function. + + Example: + stdenvNoOptimise = + addAttrsToDerivation + { NIX_CFLAGS_COMPILE = "-O0"; } + stdenv; + */ + addAttrsToDerivation = extraAttrs: stdenv: stdenv // + { mkDerivation = args: stdenv.mkDerivation (args // extraAttrs); }; + + +} |