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.
wip/yesman
John Ericson 7 years ago
parent 738bb4777c
commit 05ef1034c7
  1. 10
      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 =

Loading…
Cancel
Save