3
0
Fork 0
forked from mirrors/nixpkgs

fetchbower: handle packages with slashes in their name

Packages from github repos have slashes in their name. Nix store names
shouldn't have slashes.

Fixes rvl/bower2nix#13
This commit is contained in:
Rodney Lorrimar 2017-07-27 21:14:31 +01:00
parent a7c8f5e419
commit efaec90f60

View file

@ -7,8 +7,10 @@ let
ver = if builtins.length components == 1 then version else hash;
in ver;
bowerName = name: lib.replaceStrings ["/"] ["-"] name;
fetchbower = name: version: target: outputHash: stdenv.mkDerivation {
name = "${name}-${bowerVersion version}";
name = "${bowerName name}-${bowerVersion version}";
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildCommand = ''
fetch-bower --quiet --out=$PWD/out "${name}" "${target}" "${version}"