summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/archivers/sharutils
diff options
context:
space:
mode:
authorJude Taylor <me@jude.bio>2015-06-18 13:40:17 -0700
committerJude Taylor <me@jude.bio>2015-06-18 13:41:34 -0700
commite26b421b71d442949839c4fc65090219f7c491ab (patch)
treee156c2cc9985d4fb18e9dab9c9aceb1ccbb85395 /pkgs/tools/archivers/sharutils
parent61596bf405de245c71630101869ea3f4e8f8a20a (diff)
fix conditionals for bootstrap sed calls
Diffstat (limited to 'pkgs/tools/archivers/sharutils')
-rw-r--r--pkgs/tools/archivers/sharutils/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix
index bfeda5085b68..cc9618c4dcc4 100644
--- a/pkgs/tools/archivers/sharutils/default.nix
+++ b/pkgs/tools/archivers/sharutils/default.nix
@@ -9,10 +9,12 @@ stdenv.mkDerivation rec {
};
preConfigure =
- ''
+ let needSedSpace = ((stdenv.isFreeBSD || stdenv.isOpenBSD) && stdenv.cc.nativeTools)
+ || (stdenv.isDarwin && stdenv.cc.nativeLibc);
+ in ''
# Fix for building on Glibc 2.16. Won't be needed once the
# gnulib in sharutils is updated.
- sed -i ${stdenv.lib.optionalString ((stdenv.isFreeBSD || stdenv.isOpenBSD) && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
+ sed -i ${stdenv.lib.optionalString needSedSpace "''"} '/gets is a security hole/d' lib/stdio.in.h
'';
# GNU Gettext is needed on non-GNU platforms.