use dontBuild instead of hacks

changes:
 * buildPhase = "true"
 * buildPhase = ":"
This commit is contained in:
Robin Gloster
2016-05-04 10:11:04 +00:00
parent aadaa91379
commit 9820cb1bf2
58 changed files with 263 additions and 277 deletions
+19 -18
View File
@@ -5,33 +5,34 @@ stdenv.mkDerivation rec {
name = "swec-0.4";
src = fetchurl {
url = "http://random.zerodogg.org/files/${name}.tar.bz2";
url = "http://files.zerodogg.org/swec/${name}.tar.bz2";
sha256 = "1m3971z4z1wr0paggprfz0n8ng8vsnkc9m6s3bdplgyz7qjk6jwx";
};
buildInputs = [ makeWrapper perl LWP URI HTMLParser ]
++ stdenv.lib.optional doCheck [ HTTPServerSimple Parent ];
configurePhase =
'' for i in swec tests/{runTests,testServer}
do
sed -i "$i" -e's|/usr/bin/perl|${perl}/bin/perl|g'
done
'';
configurePhase = ''
for i in swec tests/{runTests,testServer}
do
sed -i "$i" -e's|/usr/bin/perl|${perl}/bin/perl|g'
done
'';
buildPhase = "true";
installPhase =
'' make install prefix="$out"
dontBuild = true;
mkdir -p "$out/share/${name}"
cp -v default.sdf "$out/share/${name}"
sed -i "$out/bin/swec" -e"s|realpath(\$0)|'$out/share/${name}/swec'|g"
installPhase = ''
make install prefix="$out"
wrapProgram "$out/bin/swec" \
--prefix PERL5LIB : \
${stdenv.lib.concatStringsSep ":"
(map (x: "${x}/lib/perl5/site_perl") [ LWP URI HTMLParser ])}
'';
mkdir -p "$out/share/${name}"
cp -v default.sdf "$out/share/${name}"
sed -i "$out/bin/swec" -e"s|realpath(\$0)|'$out/share/${name}/swec'|g"
wrapProgram "$out/bin/swec" \
--prefix PERL5LIB : \
${stdenv.lib.concatStringsSep ":"
(map (x: "${x}/lib/perl5/site_perl") [ LWP URI HTMLParser ])}
'';
doCheck = true;
checkPhase = "make test";