Closed
Description
Describe the bug
Flake input of a git submodule in a relative subdirectory git+file:./${submodule}
- works on 2.18.1 (
nixpkgs.nixVersions.nix_2_18
) - but no longer works on 2.19.2 (
nixpkgs.nixVersions.nix_2_19
)
Update: it seems that the regression happens since #9061. An example of this flake ref:
https://github.com/bryango/cheznix/blob/c445c8c82697de2bde53c65e9acacb9790fcd54e/flake.nix#L20-L23
The breakage would be acceptable to me if there is any alternative syntax that works, but currently I could not find anything that can replace git+file:./${submodule}
.
Steps To Reproduce
$ nix --version
nix (Nix) 2.19.2
## suppose we have `inputs.nixpkgs.url = git+file:./nixpkgs;`
$ nix flake update nixpkgs
fatal: '/nixpkgs' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
warning: could not read HEAD ref from repo at 'file://file:./nixpkgs', using 'master'
fatal: '/nixpkgs' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error:
… while updating the lock file of flake 'git+file:///home/$USER/.config/home-manager?ref=refs/heads/master&rev=c445c8c82697de2bde53c65e9acacb9790fcd54e'
… while updating the flake input 'nixpkgs'
… while fetching the input 'git+file://file:./nixpkgs'
error: program 'git' failed with exit code 128
Expected behavior
I believe submodule sub-flake is quite common and git+file:./${submodule}
should still work.
nix-env --version
output
evaluating file '/derivation-internal.nix'
nix-env (Nix) 2.19.2
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/$USER/.config/nix/nix.conf:/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/0k52aibl2flync375nfw9a0kdjzvrzrc-nix-2.19.2/share
Additional context
N/A
Priorities
Add 👍 to issues you find important.
Metadata
Metadata
Assignees
Type
Projects
Status
Done
Activity