Closed moni-dz closed 1 year ago
nix-prefetch producing differing hashes than nix-prefetch-git causes my CI to fail
nix-prefetch
nix-prefetch-git
Manually running nix-prefetch and nix-prefetch-git as a comparison
~ ❯ nix run nixpkgs#nix-prefetch -- fetchgit --url https://github.com/riverwm/river --fetchSubmodules The fetcher will be called as follows: > fetchgit { > fetchSubmodules = true; > sha256 = "sha256:0000000000000000000000000000000000000000000000000000"; > url = "https://github.com/riverwm/river"; > } sha256-x2Dlvfq4fwg8UzJID1xGYAXX8EOGfpZHwefCwiwjPC0=
~ ❯ nix-prefetch-git --url https://github.com/riverwm/river --fetch-submodules --quiet { "url": "https://github.com/riverwm/river", "rev": "b58bd829c28435799e2c080acf75f245b51e246b", "date": "2022-07-02T21:46:12+02:00", "path": "/nix/store/0blaziwlmlyplyp3y8s8pg1lsrshcvm4-river", "sha256": "1r76gmqfn05sgqphsw33w79k2470r4hxfmdify011g0dhf93k5pz", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, "leaveDotGit": false } ~ took 39s ❯ nix hash to-sri sha256:1r76gmqfn05sgqphsw33w79k2470r4hxfmdify011g0dhf93k5pz sha256-/5Y5koMNvBCAd7FV1yHJ4BAx0+FjcA0vfroA63B95uQ=
Relevant lines in nvfetcher.toml:
nvfetcher.toml
[river] src.git = "https://github.com/riverwm/river" fetch.git = "https://github.com/riverwm/river" git.fetchSubmodules = true
I would file an issue on nix-prefetch but it seems as that repository hasn't had any activity for a while now, and the move from nix-prefetch-git to nix-prefetch in 6ce85d33bbbc6345a2952fcc01a1de964b668834 is apparently causing issues.
Since #97, fetch.git will have fetchSubmodules enabled by default, consistent with fetchgit in nixpkgs.
fetch.git
fetchSubmodules
fetchgit
nix-prefetch
producing differing hashes thannix-prefetch-git
causes my CI to failManually running
nix-prefetch
andnix-prefetch-git
as a comparisonRelevant lines in
nvfetcher.toml
:I would file an issue on
nix-prefetch
but it seems as that repository hasn't had any activity for a while now, and the move fromnix-prefetch-git
tonix-prefetch
in 6ce85d33bbbc6345a2952fcc01a1de964b668834 is apparently causing issues.