git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit05ef1034c7ebbe106ebd4615b06dcf421658c56c authorJohn Ericson <John.Ericson@Obsidian.Systems> dateThu 21 Sep 2017, 14:52 (9 years ago) parent738bb47
1 file changed+5−5
pkgs/stdenv/adapters.nix+5−5
pkgs/stdenv/adapters.nix+5−5
@@ -59,17 +59,17 @@ rec {
5959 makeStdenvCross = { stdenv
6060 , cc
6161 , buildPlatform, hostPlatform, targetPlatform
62+ , # Prior overrides are surely not valid as packages built
63+ # with this run on a different platform, so disable by
64+ # default.
65+ overrides ? _: _: {}
6266 } @ overrideArgs: let
6367 stdenv = overrideArgs.stdenv.override {
6468 inherit
6569 buildPlatform hostPlatform targetPlatform
66− cc;
70+ cc overrides;
6771
6872 allowedRequisites = null;
69−
70− # Overrides are surely not valid as packages built with this run on a
71− # different platform.
72− overrides = _: _: {};
7373 };
7474 in stdenv // {
7575 mkDerivation =