mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
21 lines
693 B
Nix
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
|
|
)"
|
|
'';
|
|
}
|