diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/sqitch/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/misc/sqitch/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/sqitch/default.nix b/nixpkgs/pkgs/development/tools/misc/sqitch/default.nix new file mode 100644 index 000000000000..a077367622eb --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/sqitch/default.nix @@ -0,0 +1,28 @@ +{ name, stdenv, perl, makeWrapper, sqitchModule, databaseModule }: + +stdenv.mkDerivation { + name = "${name}-${sqitchModule.version}"; + + buildInputs = [ perl makeWrapper sqitchModule databaseModule ]; + + src = sqitchModule; + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + for d in bin/sqitch etc lib share ; do + # make sure dest alreay exists before symlink + # this prevents installing a broken link into the path + if [ -e ${sqitchModule}/$d ]; then + ln -s ${sqitchModule}/$d $out/$d + fi + done + ''; + dontStrip = true; + postFixup = "wrapProgram $out/bin/sqitch --prefix PERL5LIB : $PERL5LIB"; + + meta = { + platforms = stdenv.lib.platforms.unix; + inherit (sqitchModule.meta) license; + }; +} |