diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-26 07:54:22 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-26 07:54:22 -0500 |
commit | b45fb438b12c9bf5893124c639adabce47d5e96e (patch) | |
tree | 8378102b898c93dffe5139a66208c4d78372fb22 /pkgs/development | |
parent | fc232422201c0364dbd57826c9a137cc1239caea (diff) |
perl: Cross-compile: patch miniperl for gcc7
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/interpreters/perl/default.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index c1c92e6efdf20..f7324fc6d01ab 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurlBoot, buildPackages, enableThreading ? stdenv ? glibc }: +{ lib, stdenv, fetchurlBoot, buildPackages, enableThreading ? stdenv ? glibc, fetchpatch }: with lib; @@ -133,12 +133,19 @@ let sha256 = "072j491rpz2qx2sngbg4flqh4lx5865zyql7b9lqm6s1kknjdrh8"; }; - # Hacky! But not sure how else we can access a native-targeted gcc6 # https://github.com/arsv/perl-cross/issues/60 - nativeBuildInputs = [ buildPackages.buildPackages.gcc6 ]; + perl-cross-gcc7-patch = fetchpatch { + url = "https://github.com/arsv/perl-cross/commit/07208bc1707b8be3ea170c62c59120020cf0f87f.patch"; + sha256 = "1gh8w9m5if2s0lrx2x8f8grp74d1l6d46m8jglpjm5a1kf55j810"; + }; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; postUnpack = '' unpackFile ${perl-cross-src} + cd perl-cross-* + patch -Np1 -i ${perl-cross-gcc7-patch} + cd .. cp -R perl-cross-${crossVersion}/* perl-${version}/ ''; |