sqitchPg: fix build on darwin
This commit is contained in:
parent
96d73edaf3
commit
f42f6df759
@ -1,4 +1,4 @@
|
|||||||
{ name, stdenv, perl, makeWrapper, sqitchModule, databaseModule }:
|
{ name, stdenv, perl, makeWrapper, sqitchModule, databaseModule, shortenPerlShebang }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "${name}-${sqitchModule.version}";
|
name = "${name}-${sqitchModule.version}";
|
||||||
@ -8,6 +8,8 @@ stdenv.mkDerivation {
|
|||||||
src = sqitchModule;
|
src = sqitchModule;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
for d in bin/sqitch etc lib share ; do
|
for d in bin/sqitch etc lib share ; do
|
||||||
@ -17,6 +19,8 @@ stdenv.mkDerivation {
|
|||||||
ln -s ${sqitchModule}/$d $out/$d
|
ln -s ${sqitchModule}/$d $out/$d
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
shortenPerlShebang $out/bin/sqitch
|
||||||
'';
|
'';
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
postFixup = "wrapProgram $out/bin/sqitch --prefix PERL5LIB : $PERL5LIB";
|
postFixup = "wrapProgram $out/bin/sqitch --prefix PERL5LIB : $PERL5LIB";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user