nix-community / napalm

Support for building npm packages in Nix and lightweight npm registry [maintainer=?]
MIT License
104 stars 17 forks source link

Derivation names not sanitized #30

Open jtojnar opened 3 years ago

jtojnar commented 3 years ago

Trying to package https://github.com/ActivityWatch/aw-webui, which has the following

    "infer-owner": {
      "version": "1.0.4",
      "resolved": "https://registry.npm.taobao.org/infer-owner/download/infer-owner-1.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finfer-owner%2Fdownload%2Finfer-owner-1.0.4.tgz",
      "integrity": "sha1-xM78qo5RBRwqQLos6KPScpWvlGc=",
      "dev": true
    },

in dependencies of package-lock.json results in the following Nix error:

store path 'ffyfcwnv2p2xxwsy1f5d9ib4yvq1dfpr-infer-owner-1.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finfer-owner%2Fdownload%2Finfer-owner-1.0.4.tgz' contains illegal character '&'
Artturin commented 2 years ago

Nixpkgs always sanitizes since https://github.com/NixOS/nixpkgs/pull/166383

So sanitization can be removed from https://github.com/nix-community/napalm/blob/dcb6e93c8b6945dc854bdce691a1bf99c8b701ca/default.nix#L178