Skip to content

Commit

Permalink
perl: add patch for sw_vers on darwin
Browse files Browse the repository at this point in the history
Fixes #25090
  • Loading branch information
LnL7 committed Apr 22, 2017
1 parent 7c75ef8 commit 004ecac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/interpreters/perl/default.nix
Expand Up @@ -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)"
Expand Down
13 changes: 13 additions & 0 deletions 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

2 comments on commit 004ecac

@matthewbauer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this would cause a recursive dependency issue, but we do have "darwin.DarwinTools" now that provides sw_vers.

@LnL7
Copy link
Member Author

@LnL7 LnL7 commented on 004ecac Apr 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but we don't really want to use that in this case because that could influence the build result depending on the version of osx it was built on.

Please sign in to comment.