Improved builder for Sqitch
This commit is contained in:
@@ -1,20 +1,15 @@
|
||||
{ stdenv, writeScript, makeWrapper, sqitchModule }:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sqitch-0.999";
|
||||
buildInputs = [ makeWrapper ];
|
||||
builder = writeScript (name + "-builder.sh") ''
|
||||
. ${stdenv}/setup
|
||||
{ name, stdenv, perl, makeWrapper, sqitchModule, databaseModule }:
|
||||
stdenv.mkDerivation {
|
||||
name = "${name}-${sqitchModule.version}";
|
||||
buildInputs = [ perl makeWrapper sqitchModule databaseModule ];
|
||||
unpackPhase = ":";
|
||||
buildPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
for d in bin/sqitch etc lib share ; do
|
||||
ln -s ${sqitchModule}/$d $out/$d
|
||||
done
|
||||
fixupPhase
|
||||
wrapProgram $out/bin/sqitch \
|
||||
--prefix PERL5LIB : \
|
||||
"$(for i in $(cat ${sqitchModule}/nix-support/propagated-native-build-inputs) ; do
|
||||
echo -n "$i"/lib/perl5/site_perl:
|
||||
done
|
||||
echo ${sqitchModule}/lib/perl5/site_perl
|
||||
)"
|
||||
'';
|
||||
dontStrip = true;
|
||||
postFixup = "wrapProgram $out/bin/sqitch --prefix PERL5LIB : $PERL5LIB";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user