diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-28 16:36:09 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-28 16:36:09 +0100 |
commit | cf8daf63120adedbeaf5bc8c2f396be2496a741e (patch) | |
tree | 74930a51b68976b616f8c7a7a9c1c07e191ed39c /pkgs/stdenv/linux | |
parent | 6fd4f635300303906fd4b068b196b8e1310b9e6d (diff) | |
download | nixlib-cf8daf63120adedbeaf5bc8c2f396be2496a741e.tar nixlib-cf8daf63120adedbeaf5bc8c2f396be2496a741e.tar.gz nixlib-cf8daf63120adedbeaf5bc8c2f396be2496a741e.tar.bz2 nixlib-cf8daf63120adedbeaf5bc8c2f396be2496a741e.tar.lz nixlib-cf8daf63120adedbeaf5bc8c2f396be2496a741e.tar.xz nixlib-cf8daf63120adedbeaf5bc8c2f396be2496a741e.tar.zst nixlib-cf8daf63120adedbeaf5bc8c2f396be2496a741e.zip |
Add an option ‘stdenv.userHook’ to set a global stdenv setup hook
This allows various applications. It allows users to set global optimisation flags, e.g. stdenv.userHook = ''NIX_CFLAGS_COMPILE+=" -funroll-loops"''; But the impetus is as an alternative to issue #229, allowing impure stdenv setup for people who want to use distcc: stdenv.userHook = "source /my/impure/setup-script.sh"; This is probably a bad idea, but at least now it's a bad idea in people's configuration and not in Nixpkgs. :-)
Diffstat (limited to 'pkgs/stdenv/linux')
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 3105e76f8177..777b2cf6a328 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -7,7 +7,7 @@ # The function defaults are for easy testing. { system ? builtins.currentSystem , allPackages ? import ../../top-level/all-packages.nix -, platform ? null }: +, platform ? null, config }: rec { @@ -81,7 +81,7 @@ rec { {gcc, extraAttrs ? {}, overrides ? (pkgs: {}), extraPath ? [], fetchurl}: import ../generic { - inherit system; + inherit system config; name = "stdenv-linux-boot"; preHook = '' @@ -261,7 +261,7 @@ rec { # dependency (`nix-store -qR') on bootstrapTools or the # first binutils built. stdenvLinux = import ../generic rec { - inherit system; + inherit system config; preHook = commonPreHook; |