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

+3 -1
+3 -1
pkgs/build-support/fetchbower/default.nix
··· 7 ver = if builtins.length components == 1 then version else hash; 8 in ver; 9 10 fetchbower = name: version: target: outputHash: stdenv.mkDerivation { 11 - name = "${name}-${bowerVersion version}"; 12 SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; 13 buildCommand = '' 14 fetch-bower --quiet --out=$PWD/out "${name}" "${target}" "${version}"
··· 7 ver = if builtins.length components == 1 then version else hash; 8 in ver; 9 10 + bowerName = name: lib.replaceStrings ["/"] ["-"] name; 11 + 12 fetchbower = name: version: target: outputHash: stdenv.mkDerivation { 13 + name = "${bowerName name}-${bowerVersion version}"; 14 SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; 15 buildCommand = '' 16 fetch-bower --quiet --out=$PWD/out "${name}" "${target}" "${version}"