nmattia / niv

Easy dependency management for Nix projects
https://github.com/nmattia/niv
MIT License
1.52k stars 74 forks source link

error: in pure evaluation mode, 'fetchTarball' requires a 'sha256' argument #377

Closed vimtoe closed 8 months ago

vimtoe commented 9 months ago

hi, first - thank you! niv is awesome! I add pinned packages to my devShell like so:

buildInputs = with pkgs; [
  (import sources.niv { inherit pkgs; }).niv
  (import sources.home-manager { inherit pkgs; }).home-manager
]

and now i can use the version of niv and home-manager that niv pinned, without actually installing niv or home-manager on my system. magic. Today I added another package in the same way, I added it with niv and then added:

buildInputs = with pkgs; [
  (import sources.system-manager { inherit pkgs; }).system-manager
]

but unlike with niv and home-manager, I get an error:

error: in pure evaluation mode, 'fetchTarball' requires a 'sha256' argument

which is strange as looking at the sources.json file it does have a "sha256" entry just above the "type: tarball", so perhaps it the resulting sources.nix file?

any help is greatly appreciated, I have spent hours trying to fix it but my nix-fu is weak :( thank you.

nmattia commented 8 months ago

thank you! niv is awesome!

oh you're too nice!

Could you share the repo, or at least the sources.json? Is the type: also tarball for niv & home-manager? Can you reproduce the issue in other setups, or create a minimal example that has this issue?

vimtoe commented 8 months ago

sorry for not replying sooner! and allow me to close this issue as it is not one (my own fault), the package above system-manager is not a pkg that is to be installed, you make your config, and use nix run to make it, once again - thank you for niv, now versioning is simple!