diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-09-21 14:52:07 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-09-21 14:52:07 -0400 |
commit | 05ef1034c7ebbe106ebd4615b06dcf421658c56c (patch) | |
tree | 295126442bd648acd1a42afe30d29610d462d2cd /pkgs/stdenv/adapters.nix | |
parent | 738bb4777cf08625adf22f50227377003598f7ad (diff) | |
download | nixlib-05ef1034c7ebbe106ebd4615b06dcf421658c56c.tar nixlib-05ef1034c7ebbe106ebd4615b06dcf421658c56c.tar.gz nixlib-05ef1034c7ebbe106ebd4615b06dcf421658c56c.tar.bz2 nixlib-05ef1034c7ebbe106ebd4615b06dcf421658c56c.tar.lz nixlib-05ef1034c7ebbe106ebd4615b06dcf421658c56c.tar.xz nixlib-05ef1034c7ebbe106ebd4615b06dcf421658c56c.tar.zst nixlib-05ef1034c7ebbe106ebd4615b06dcf421658c56c.zip |
stdenv cross adaptor: Add optional `overrides` parameter
By default, all previous overrides are discarded as before, as they would only apply to the old host platform. But sometimes it is useful to add some new ones, and this optional parameter allows that.
Diffstat (limited to 'pkgs/stdenv/adapters.nix')
-rw-r--r-- | pkgs/stdenv/adapters.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 07d1c245b49c..b79ada60b3fd 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -59,17 +59,17 @@ rec { makeStdenvCross = { stdenv , cc , buildPlatform, hostPlatform, targetPlatform + , # Prior overrides are surely not valid as packages built + # with this run on a different platform, so disable by + # default. + overrides ? _: _: {} } @ overrideArgs: let stdenv = overrideArgs.stdenv.override { inherit buildPlatform hostPlatform targetPlatform - cc; + cc overrides; allowedRequisites = null; - - # Overrides are surely not valid as packages built with this run on a - # different platform. - overrides = _: _: {}; }; in stdenv // { mkDerivation = |