Flake inputs in subdirs... what's changed?

For weeks now I’ve had the following input in the flake of a project I’m working on

alexandria.url = "git+https://github.com/magthe/alexandria?ref=add-haskell-lib&dir=haskell";

But now it’s stopped working

❮ nix flake update alexandria
warning: Git tree '/home/elrond/Work/hs-alexandria' is dirty
fatal: repository 'https://github.com/magthe/alexandria?dir=haskell/' not found
warning: could not update mtime for file '/home/elrond/.cache/nix/gitv3/1vl7ncz7bsa6pblshndp4kdf7c42ss9958n1vz26rg6wqbmri9w1/refs/heads/add-haskell-lib': changing modification time of '"/home/elrond/.cache/nix/gitv3/1vl7ncz7bsa6pblshndp4kdf7c42ss9958n1vz26rg6wqbmri9w1/refs/heads/add-haskell-lib"' (using `utimensat`): No such file or directory
error:
       … while updating the lock file of flake 'git+file:///home/elrond/Work/alexandria?dir=examples/haskell'

       … while updating the flake input 'alexandria'

       … while fetching the input 'git+https://github.com/magthe/alexandria?dir=haskell&ref=add-haskell-lib'

       error: resolving Git reference 'add-haskell-lib': revspec 'add-haskell-lib' not found

Is it no longer possible to pull a flake.nix from a subdir?

❯ nix --version
nix (Nix) 2.24.12

❯ git --version
git version 2.47.2

Does it work with nix 2.24.11?

The error is complaining about a ref, not the dir. Does it still exist?

https://github.com/magthe/alexandria already gives me 404.
Seems the author has deleted the repository.

Yes, both the ref and the dir exists

And it complains about the repo first:

fatal: repository 'https://github.com/magthe/alexandria?dir=haskell/' not found

So I’m guessing the complaint about the ref follows from that.

Oups, it turns out this was caused by me changing from nixpkgs-unstable to nixos-24.11, which caused nix to be downgraded from 2.25 to 2.24.

Switching to nixVersions.nix_2_25 made it work again.

:man_facepalming:

I think this might be caused by #12417. It works on 2.24.11 and 2.25.5, but not on 2.24.12.