niv
niv copied to clipboard
niv add git ... does not add checksum
niv does not add checksums for git repositories:
$ niv add git [email protected]:tokudan/nur.git
Adding package nur
Writing new sources file
Done: Adding package nur
$ niv update
Updating all packages
Package: nur
Done: Updating all packages
$ cat nix/sources.json
{
"nur": {
"ref": "master",
"repo": "[email protected]:tokudan/nur.git",
"rev": "acb95091fa2430c48bd654ad1940ca1dd30fac48",
"type": "git"
}
}
That is correct. Those could be added, we need to figure out we we want to re implement the hashing or use nix-prefetch-git
. Right now only builtins.fetchgit
is supported which doesn't need checksums. Do you need checksums for e.g. pkgs.fetchGit
?
Hi,
i just ran across the same thing. I would like to export the niv attrset to a json file like {"a": "/nix/store/a...", "b": "/nix/store/b...", ...}
and calculate and store its closure in some offline-nixstore, so that machines that re-evaluate the expressions don't need to re-download.
This does generally work after mapping all those store paths through builtins.storePath
, but it does not work for git packages in niv due to the missing sha hash (so there is no upfront-storepath calculation and it tries to download).
Speaking for myself, i would need some method to describe the hash in niv (so that niv update
does something) and then get the stuff checked out from repos where i can only authenticate via git/ssh.
@tfc so do you just need a sha256
field? that's definitely doable