mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
Improved builder for Sqitch
This commit is contained in:
parent
566cd9ba19
commit
a3a98d7242
3 changed files with 21 additions and 23 deletions
|
@ -1,20 +1,15 @@
|
||||||
{ stdenv, writeScript, makeWrapper, sqitchModule }:
|
{ name, stdenv, perl, makeWrapper, sqitchModule, databaseModule }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation {
|
||||||
name = "sqitch-0.999";
|
name = "${name}-${sqitchModule.version}";
|
||||||
buildInputs = [ makeWrapper ];
|
buildInputs = [ perl makeWrapper sqitchModule databaseModule ];
|
||||||
builder = writeScript (name + "-builder.sh") ''
|
unpackPhase = ":";
|
||||||
. ${stdenv}/setup
|
buildPhase = ":";
|
||||||
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
for d in bin/sqitch etc lib share ; do
|
for d in bin/sqitch etc lib share ; do
|
||||||
ln -s ${sqitchModule}/$d $out/$d
|
ln -s ${sqitchModule}/$d $out/$d
|
||||||
done
|
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";
|
||||||
}
|
}
|
||||||
|
|
|
@ -7816,8 +7816,10 @@ let
|
||||||
|
|
||||||
planetary_annihilation = callPackage ../games/planetaryannihilation { };
|
planetary_annihilation = callPackage ../games/planetaryannihilation { };
|
||||||
|
|
||||||
sqitch = callPackage ../development/tools/misc/sqitch {
|
sqitchPg = callPackage ../development/tools/misc/sqitch {
|
||||||
inherit stdenv writeScript makeWrapper ;
|
inherit stdenv perl makeWrapper;
|
||||||
|
name = "sqitch-pg";
|
||||||
|
databaseModule = perlPackages.DBDPg;
|
||||||
sqitchModule = perlPackages.AppSqitch;
|
sqitchModule = perlPackages.AppSqitch;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -219,8 +219,9 @@ let self = _self // overrides; _self = with self; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
AppSqitch = buildPerlModule {
|
AppSqitch = buildPerlModule rec {
|
||||||
name = "App-Sqitch-0.999";
|
version = "0.999";
|
||||||
|
name = "App-Sqitch-${version}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-0.999.tar.gz;
|
url = mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-0.999.tar.gz;
|
||||||
sha256 = "e7e02194a7b0c42fb4df046cd834d5eb99ff9a2c169f5c60a52c362e89351da6";
|
sha256 = "e7e02194a7b0c42fb4df046cd834d5eb99ff9a2c169f5c60a52c362e89351da6";
|
||||||
|
@ -235,11 +236,11 @@ let self = _self // overrides; _self = with self; {
|
||||||
IPCSystemSimple ListMoreUtils Moo PathClass PerlIOutf8_strict StringFormatter
|
IPCSystemSimple ListMoreUtils Moo PathClass PerlIOutf8_strict StringFormatter
|
||||||
StringShellQuote SubExporter TemplateTiny Throwable TryTiny TypeTiny URI
|
StringShellQuote SubExporter TemplateTiny Throwable TryTiny TypeTiny URI
|
||||||
URIdb libintlperl namespaceautoclean
|
URIdb libintlperl namespaceautoclean
|
||||||
strictures ModuleRuntime DevelGlobalDestruction SubExporterProgressive
|
# strictures ModuleRuntime DevelGlobalDestruction SubExporterProgressive
|
||||||
ImportInto ExporterTiny DataOptList ParamsUtil SubInstall RoleTiny
|
# ImportInto ExporterTiny DataOptList ParamsUtil SubInstall RoleTiny
|
||||||
MooXTypesMooseLike ClassLoad ModuleImplementation ClassLoadXS
|
# MooXTypesMooseLike ClassLoad ModuleImplementation ClassLoadXS
|
||||||
BHooksEndOfScope namespaceclean PackageStash SubIdentify
|
# BHooksEndOfScope namespaceclean PackageStash SubIdentify
|
||||||
ClassMethodModifiers
|
# ClassMethodModifiers
|
||||||
];
|
];
|
||||||
doCheck = false; # Can't find home directory.
|
doCheck = false; # Can't find home directory.
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Reference in a new issue