nixpkgs/pkgs/development/tools/misc/sqitch/default.nix
2015-03-15 09:59:41 -04:00

21 lines
693 B
Nix

{ stdenv, writeScript, makeWrapper, sqitchModule }:
stdenv.mkDerivation rec {
name = "sqitch-0.999";
buildInputs = [ makeWrapper ];
propagatedNativeBuildInputs = [ sqitchModule ];
builder = writeScript (name + "-builder.sh") ''
. ${stdenv}/setup
mkdir -p $out/bin
cp ${sqitchModule}/bin/sqitch $out/bin
fixupPhase
wrapProgram $out/bin/sqitch \
--prefix PERL5LIB : \
"$(for i in "$propagatedNativeBuildInputs" ; do
for j in $(cat $i/nix-support/propagated-native-build-inputs) ; do
echo -n "$j"/lib/perl5/site_perl:
done
done
echo "$propagatedNativeBuildInputs"/lib/perl5/site_perl
)"
'';
}