Skip to content

Commit

Permalink
feat: support sha1 integrity hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
gBasil committed Aug 12, 2023
1 parent 70a0aef commit b798326
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lockfile.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ rec {
baseName = last (splitString "/" (withoutVersion n));
version = getVersion n;
in
fetchurl {
url = "${registry}/${name}/-/${baseName}-${version}.tgz";
sha512 = v.resolution.integrity;
}
fetchurl (
{
url = "${registry}/${name}/-/${baseName}-${version}.tgz";
} // (
if hasPrefix "sha1-" v.resolution.integrity then
{ sha1 = v.resolution.integrity; }
else
{ sha512 = v.resolution.integrity; }
)
)
else
gitTarball n v
)
Expand Down

0 comments on commit b798326

Please sign in to comment.