From 004ecac47b4639c6f8a8419ce2e1dcd18c78268b Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 21 Apr 2017 22:26:31 +0200 Subject: [PATCH] perl: add patch for sw_vers on darwin Fixes #25090 --- pkgs/development/interpreters/perl/default.nix | 2 +- pkgs/development/interpreters/perl/sw_vers.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/interpreters/perl/sw_vers.patch diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index bbe59f99eef3..3fe04e6bde2e 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -36,7 +36,7 @@ let ./no-sys-dirs.patch ] ++ optional stdenv.isSunOS ./ld-shared.patch - ++ optional stdenv.isDarwin [ ./cpp-precomp.patch ]; + ++ optional stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ]; postPatch = '' pwd="$(type -P pwd)" diff --git a/pkgs/development/interpreters/perl/sw_vers.patch b/pkgs/development/interpreters/perl/sw_vers.patch new file mode 100644 index 000000000000..9d4cd75486e6 --- /dev/null +++ b/pkgs/development/interpreters/perl/sw_vers.patch @@ -0,0 +1,13 @@ +diff --git a/hints/darwin.sh b/hints/darwin.sh +index afadf53..80b7533 100644 +--- a/hints/darwin.sh ++++ b/hints/darwin.sh +@@ -329,7 +329,7 @@ EOM + # sw_vers output what we want + # "ProductVersion: 10.10.5" "10.10" + # "ProductVersion: 10.11" "10.11" +- prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'` ++ prodvers="10.10" + case "$prodvers" in + 10.*) + add_macosx_version_min ccflags $prodvers