summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver
diff options
context:
space:
mode:
authorMel Bourgeois <mason.bourgeois@gmail.com>2022-10-26 19:23:08 -0500
committerMel Bourgeois <mason.bourgeois@gmail.com>2022-10-26 19:23:08 -0500
commit0bb8e949007c292e179a2690f1837157376e6560 (patch)
tree7c47347d157bb608addd3e2b6e3b6134ecc88ea5 /pkgs/development/python-modules/rangehttpserver
parent4f8287f3d597c73b0d706cfad028c2d51821f64d (diff)
yarn2nix: Handle lockfile entries with multiple integrity hashes
Some NPM packages provide multiple integrity hashes with different algorithms. These are space separated, like below: ``` tar@^4: version "4.4.19" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" integrity "sha1-Lk1yY98m8rkU3uEMglqxMhI3QvM= sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==" ``` Currently, yarn2nix isn't able to handle these lockfile entries, producing an error like `error: hash 'Lk1yY98m8rkU3uEMglqxMhI3QvM= sha512' has wrong length for hash type 'sha1'`. This is because it isn't aware that spaces could separate multiple hashes. This commit uses the official Standard Subresource Integrity package from npm to parse the integrity line, and pick the best available algorithm. It also replaced many of the local yarn2nix entries with sha512, even ones that don't include it in the lockfile. Not sure how that happened, but it works in practice! The addition of `ssri` may also reduce signs and symptoms of depression.
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions