Make fetchBower a bit more like a normal mkDerivation, which is easier to test.

Also, in some cases, the result of fetchBower is different depending on the
value of $out. For now, it seems that it works best if using a local output
directory before copying to $out.

(cherry picked from commit aa4c6b027163abe0891f9ad438899f9679298a64)
This commit is contained in:
Rob Vermaas 2015-07-16 14:35:31 +00:00
parent 166aed1228
commit b715546071

View File

@ -1,9 +1,11 @@
{ stdenv, fetch-bower, git }: name: version: target: outputHash: stdenv.mkDerivation { { stdenv, fetch-bower, git }: name: version: target: outputHash: stdenv.mkDerivation {
name = "${name}-${version}"; name = "${name}-${version}";
realBuilder = "${fetch-bower}/bin/fetch-bower"; buildCommand = ''
args = [ name version target ]; out=$PWD/out fetch-bower ${name} ${version} ${target}
cp -R out $out
'';
outputHashMode = "recursive"; outputHashMode = "recursive";
outputHashAlgo = "sha256"; outputHashAlgo = "sha256";
inherit outputHash; inherit outputHash;
PATH = "${git}/bin"; buildInputs = [git fetch-bower];
} }