cross: allow makeWrapper in emulated builds

This commit is contained in:
Colin 2023-08-06 01:51:55 +00:00
parent 4b072ecbe5
commit a4860c3963

View File

@ -106,7 +106,7 @@ let
let let
# patch packages which can't ordinarily exist in buildPackages # patch packages which can't ordinarily exist in buildPackages
preFixPkg = p: preFixPkg = p:
if p.name == "make-shell-wrapper-hook" then if p.name or null == "make-shell-wrapper-hook" then
p.overrideAttrs (_: { p.overrideAttrs (_: {
# unconditionally use the outermost targetPackages shell # unconditionally use the outermost targetPackages shell
shell = final.runtimeShell; shell = final.runtimeShell;
@ -119,7 +119,7 @@ let
p p
; ;
unsplicePkg = p: p.__spliced.hostTarget or p; unsplicePkg = p: p.__spliced.hostTarget or p;
unsplicePkgs = ps: map (p: unsplicePkg (preFixPkg p))ps; unsplicePkgs = ps: map (p: unsplicePkg (preFixPkg p)) ps;
in in
pkg: emulateBuilder ((pkg.override { pkg: emulateBuilder ((pkg.override {
inherit (emulated) stdenv; inherit (emulated) stdenv;