Skip to content

Commit

Permalink
stdenv.mkDerivation: workaround hacks in perl cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin committed Dec 5, 2022
1 parent d79affc commit cb459fb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkgs/stdenv/generic/make-derivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,18 @@ let
if (lib.isDerivation dep && dep ? stdenv) then
if (stdenv.buildPlatform.canExecute dep.stdenv.hostPlatform)
then dep
else lib.warn "${dep.name} in ${attrs.name or attrs.pname}'s ${listName} not executable on build" dep
else
# TODO(@Artturin) remove workaround
# if something has __spliced then it has been spliced but may not have a buildHost
# example: perl's cross-compilation is bad and has some hacks
# perl's mini output is only created when buildPlatfom != hostPlatform
# > pkgsCross.aarch64-multiplatform.buildPackages.perl.mini
# <does not exist>
# > pkgsCross.aarch64-multiplatform.buildPackages.__splicedPackages.perl.mini.__spliced
# { targetTarget = «derivation ...perl-aarch64-unknown-linux-gnu...»; }
if (!dep ? __spliced) then
lib.warn "${dep.name} in ${attrs.name or attrs.pname}'s ${listName} not executable on build" dep
else dep
else dep;

nameToSplicedName = {
Expand Down

0 comments on commit cb459fb

Please sign in to comment.