nixpkgs/pkgs/build-support/fetchbower/default.nix
Rob Vermaas b715546071 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)
2015-07-16 14:42:16 +00:00

12 lines
341 B
Nix

{ stdenv, fetch-bower, git }: name: version: target: outputHash: stdenv.mkDerivation {
name = "${name}-${version}";
buildCommand = ''
out=$PWD/out fetch-bower ${name} ${version} ${target}
cp -R out $out
'';
outputHashMode = "recursive";
outputHashAlgo = "sha256";
inherit outputHash;
buildInputs = [git fetch-bower];
}