From 05ef1034c7ebbe106ebd4615b06dcf421658c56c Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 21 Sep 2017 14:52:07 -0400 Subject: [PATCH] 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. --- pkgs/stdenv/adapters.nix | 10 +++++----- 1 file 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 =