summary refs log tree commit diff
path: root/pkgs/development/tools/misc/sqitch
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-12-18 04:20:00 -0500
committerMario Rodas <marsam@users.noreply.github.com>2019-12-18 04:20:00 -0500
commitf42f6df759e1c4daedd8f2bd26e94c0b628dcab8 (patch)
treea424cfd0e4c8d79191817787536e9fa13ab795d2 /pkgs/development/tools/misc/sqitch
parent96d73edaf33f4c9ee452f65504bfdfab9a653eaa (diff)
downloadnixpkgs-f42f6df759e1c4daedd8f2bd26e94c0b628dcab8.tar
nixpkgs-f42f6df759e1c4daedd8f2bd26e94c0b628dcab8.tar.gz
nixpkgs-f42f6df759e1c4daedd8f2bd26e94c0b628dcab8.tar.bz2
nixpkgs-f42f6df759e1c4daedd8f2bd26e94c0b628dcab8.tar.lz
nixpkgs-f42f6df759e1c4daedd8f2bd26e94c0b628dcab8.tar.xz
nixpkgs-f42f6df759e1c4daedd8f2bd26e94c0b628dcab8.tar.zst
nixpkgs-f42f6df759e1c4daedd8f2bd26e94c0b628dcab8.zip
sqitchPg: fix build on darwin
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 a077367622e..66d40ae3127 100644
--- a/pkgs/development/tools/misc/sqitch/default.nix
+++ b/pkgs/development/tools/misc/sqitch/default.nix
@@ -1,4 +1,4 @@
-{ name, stdenv, perl, makeWrapper, sqitchModule, databaseModule }:
+{ name, stdenv, perl, makeWrapper, sqitchModule, databaseModule, shortenPerlShebang }:
 
 stdenv.mkDerivation {
   name = "${name}-${sqitchModule.version}";
@@ -8,6 +8,8 @@ stdenv.mkDerivation {
   src = sqitchModule;
   dontBuild = true;
 
+  nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
+
   installPhase = ''
     mkdir -p $out/bin
     for d in bin/sqitch etc lib share ; do
@@ -17,6 +19,8 @@ stdenv.mkDerivation {
         ln -s ${sqitchModule}/$d $out/$d
       fi
     done
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    shortenPerlShebang $out/bin/sqitch
   '';
   dontStrip = true;
   postFixup = "wrapProgram $out/bin/sqitch --prefix PERL5LIB : $PERL5LIB";