Add Sqitch database management tool
This commit is contained in:
21
pkgs/development/tools/misc/sqitch/default.nix
Normal file
21
pkgs/development/tools/misc/sqitch/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ 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
|
||||
)"
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user