$ nix repl
Lix 2.91.1
Type :? for help.
nix-repl> :lf git+https://codeberg.org/xmobar/xmobar.git/?dir=nix
Added 17 variables.
$ nix shell nixpkgs#nix -c nix repl
Nix 2.24.12
Type :? for help.
nix-repl> :lf git+https://codeberg.org/xmobar/xmobar.git/?dir=nix
fatal: https://codeberg.org/xmobar/xmobar.git/?dir=nix/info/refs not valid: could not determine hash algorithm; is this a git repository?
warning: could not read HEAD ref from repo at 'https://codeberg.org/xmobar/xmobar.git/?dir=nix', using 'master'
fatal: https://codeberg.org/xmobar/xmobar.git/?dir=nix/info/refs not valid: could not determine hash algorithm; is this a git repository?
In the meantime, since lix appears to work, you could use that, or use an older version of nix.
I don’t think it’s #12325 because your issue surfaced in 2.24.12 only and isn’t present in 2.24.11, but #12325 is about 2.24.11 having some regressions. The other link is a PR, which doesn’t appear to fix your issue.
IMO you’d be better off reporting your issue, since I don’t see any open issue regarding the regression you found.
I’ve just got a reply on the issue I opened in Github, and it appears to be that a fix was checked a week a go. The questions is, how do I get it now? Since my nix is broken I cant update my system.
Not so simple these days, as nixpkgs has removed every version of Nix before 2.24 (except 2.3). See the relevant issue.
In the absence of this, grabbing from stable is the best way to access versions like Nix 2.18 right now. Some things have improved since 2.18 that I’d like to keep, though, so Lix is my personal solution here.