sqitchPg: fix build on darwin

main
Mario Rodas 5 years ago
parent 96d73edaf3
commit f42f6df759
No known key found for this signature in database
GPG Key ID: 4C4BEFD7B18DC5E8
  1. 6
      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";

Loading…
Cancel
Save