mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
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.
This commit is contained in:
parent
738bb4777c
commit
05ef1034c7
@ -59,17 +59,17 @@ rec {
|
|||||||
makeStdenvCross = { stdenv
|
makeStdenvCross = { stdenv
|
||||||
, cc
|
, cc
|
||||||
, buildPlatform, hostPlatform, targetPlatform
|
, 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
|
} @ overrideArgs: let
|
||||||
stdenv = overrideArgs.stdenv.override {
|
stdenv = overrideArgs.stdenv.override {
|
||||||
inherit
|
inherit
|
||||||
buildPlatform hostPlatform targetPlatform
|
buildPlatform hostPlatform targetPlatform
|
||||||
cc;
|
cc overrides;
|
||||||
|
|
||||||
allowedRequisites = null;
|
allowedRequisites = null;
|
||||||
|
|
||||||
# Overrides are surely not valid as packages built with this run on a
|
|
||||||
# different platform.
|
|
||||||
overrides = _: _: {};
|
|
||||||
};
|
};
|
||||||
in stdenv // {
|
in stdenv // {
|
||||||
mkDerivation =
|
mkDerivation =
|
||||||
|
Loading…
Reference in New Issue
Block a user