Description
Hi,
I have the following use case, but it seems like niv
(currently) does not support it.
Here is the scenario:
- I want to add https://github.com/darktable-org/darktable to niv
- but only adding it as
type=tarball
does not allow me to fetch submodules, therefore thesha256
is incorrect (differs from the one with submodules) - using
type=git
and the unstable nix version as described in fetchGit and submodules #58 would work, but as I understand it, that means thatniv update
is a no-op on thejson
and everytime I import fromsources.nix
it will download the repo again (which takes a lot time)
- but only adding it as
What I want is a json
entry that also has the sha256 set, such that the evaluation of sources.nix
does not download the huge git repo everytime.
As far as I see, the problem is that the builtins.fetchgit
does not support adding a sha256
, so this would require fetchFromGitHub
which is not builtin. I could change my sources.nix to add this, which is nice, but what I don't get is that niv update
works and updates the package...
Can you confirm my observations? What would be a good way to add this behavior to the code? It seems like we could add a case on type
in:
Lines 346 to 349 in f73bf8d
and for example use nix-prefetch-git
for a github
type?