NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.76k stars 1.52k forks source link

Flakes break when being part of an sha256 git repository #11561

Open zilti opened 1 month ago

zilti commented 1 month ago

I have a sha256-based git repository with a flake.nix in it. I cannot properly use my flake:

$ use flake . --impure --show-trace

warning: Git tree '/home/zilti/projects/chicken6-flake' is dirty
warning: creating lock file '/home/zilti/projects/chicken6-flake/flake.lock'
error:
       … while updating the lock file of flake 'git+file:///home/zilti/projects/chicken6-flake'

       … while fetching the input 'git+file:///home/zilti/projects/chicken6-flake'

       error: hash '198461b4bc842fde74f065402dcf42e3956eb36e8a990d2782e7b4bd861bc67a' has wrong length for hash type 'sha1'
direnv: nix-direnv: Evaluating current devShell failed. Falling back to previous environment!
direnv: export +NIX_DIRENV_DID_FALLBACK ~PATH
zilti commented 1 month ago

Same goes for when one's trying to use a flake as a template using nix flake new -t: This will result in fatal: mismatched algorithms: client sha1; server sha256.

Mic92 commented 1 month ago

Where can we case the chicken6-flake?

zilti commented 1 month ago

Here: https://gitea.lyrion.ch/zilti/chicken6-flake/