about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/sqitch
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2017-10-14 02:10:35 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2017-10-14 14:41:29 -0500
commitb5610ed3f0cfdad9a6c7d542e963659f63e4f3a7 (patch)
treedb666b1344b87030799894d02987e3e16f6c8e55 /pkgs/development/tools/misc/sqitch
parent06fc476bc6f23426b0d62864f3fa01d400e57445 (diff)
sqitch: fix on Darwin
Fixes #30389.
Diffstat (limited to 'pkgs/development/tools/misc/sqitch')
-rw-r--r--pkgs/development/tools/misc/sqitch/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/sqitch/default.nix b/pkgs/development/tools/misc/sqitch/default.nix
index b7b42b59653a9..8328433a823f0 100644
--- a/pkgs/development/tools/misc/sqitch/default.nix
+++ b/pkgs/development/tools/misc/sqitch/default.nix
@@ -11,7 +11,11 @@ stdenv.mkDerivation {
   installPhase = ''
     mkdir -p $out/bin
     for d in bin/sqitch etc lib share ; do
-      ln -s ${sqitchModule}/$d $out/$d
+      # make sure dest alreay exists before symlink
+      # this prevents installing a broken link into the path
+      if [ -e ${sqitchModule}/$d ]; then
+        ln -s ${sqitchModule}/$d $out/$d
+      fi
     done
   '';
   dontStrip = true;