summary refs log tree commit diff
path: root/pkgs/stdenv/adapters.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-21 14:52:07 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-21 14:52:07 -0400
commit05ef1034c7ebbe106ebd4615b06dcf421658c56c (patch)
tree295126442bd648acd1a42afe30d29610d462d2cd /pkgs/stdenv/adapters.nix
parent738bb4777cf08625adf22f50227377003598f7ad (diff)
downloadnixlib-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.nix10
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 =