diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index 27ccb6f22c69..8f539d233925 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -28,7 +28,7 @@ let # TODO: Add a "dev" output containing the header files. outputs = [ "out" "man" "devdoc" ] ++ - optional crossCompiling "dev"; + optional crossCompiling "mini"; setOutputFlags = false; disallowedReferences = [ stdenv.cc ]; @@ -144,13 +144,13 @@ let --replace "$man" /no-such-path '' + optionalString crossCompiling '' - mkdir -p $dev/lib/perl5/cross_perl/${version} + mkdir -p $mini/lib/perl5/cross_perl/${version} for dir in cnf/{stub,cpan}; do - cp -r $dir/* $dev/lib/perl5/cross_perl/${version} + cp -r $dir/* $mini/lib/perl5/cross_perl/${version} done - mkdir -p $dev/bin - install -m755 miniperl $dev/bin/perl + mkdir -p $mini/bin + install -m755 miniperl $mini/bin/perl export runtimeArch="$(ls $out/lib/perl5/site_perl/${version})" # wrapProgram should use a runtime-native SHELL by default, but @@ -161,9 +161,9 @@ let # miniperl can't load the native modules there. However, it can # (and sometimes needs to) load and run some of the pure perl # code there, so we add it anyway. When needed, stubs can be put - # into $dev/lib/perl5/cross_perl/${version}. - wrapProgram $dev/bin/perl --prefix PERL5LIB : \ - "$dev/lib/perl5/cross_perl/${version}:$out/lib/perl5/${version}:$out/lib/perl5/${version}/$runtimeArch" + # into $mini/lib/perl5/cross_perl/${version}. + wrapProgram $mini/bin/perl --prefix PERL5LIB : \ + "$mini/lib/perl5/cross_perl/${version}:$out/lib/perl5/${version}:$out/lib/perl5/${version}/$runtimeArch" ''; # */ meta = { diff --git a/pkgs/development/interpreters/perl/setup-hook-cross.sh b/pkgs/development/interpreters/perl/setup-hook-cross.sh index 95aae0b2670f..a7aad6f2453e 100644 --- a/pkgs/development/interpreters/perl/setup-hook-cross.sh +++ b/pkgs/development/interpreters/perl/setup-hook-cross.sh @@ -9,4 +9,4 @@ addPerlLibPath () { addToSearchPath PERL5LIB $1/lib/perl5/site_perl/@version@/@runtimeArch@ } -addEnvHooks "$targetOffset" addPerlLibPath +addEnvHooks "$hostOffset" addPerlLibPath diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 79c7919a3541..c7b57eae9067 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -42,7 +42,7 @@ toPerlModule(stdenv.mkDerivation ( version = lib.getVersion attrs; # TODO: phase-out `attrs.name` builder = ./builder.sh; buildInputs = buildInputs ++ [ perl ]; - nativeBuildInputs = nativeBuildInputs ++ [ (perl.dev or perl) ]; + nativeBuildInputs = nativeBuildInputs ++ [ (perl.mini or perl) ]; fullperl = buildPerl; } ))