-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flake inputs: git submodules/recursive checkout #4357
Comments
I want git submodules badly, so here is my equally bad try on adding support for them. TODO: This now unconditionally adds submodules for all flake inputs. Do we want that? This currently makes it equivalent to appending `?submodules=1` to the url. I need to figure out how this can be done for `self`. Fixes: NixOS#4357
I want git submodules badly, so here is my equally bad attempt on adding support for them in flakes. TODO: - This now unconditionally adds submodules for all flake inputs. Do we want that? - This currently makes it equivalent to appending `?submodules=1` to the url. Do we want that? - Figure out how this can be done for `self`. Fixes: NixOS#4357
I want git submodules badly, so here is my equally bad attempt on adding support for them in flakes. TODO: - This now unconditionally adds submodules for all flake inputs. Do we want that? - This currently makes it equivalent to appending `?submodules=1` to the url. Do we want that? - Figure out how this can be done for `self`. - Add a test for the behaviour Fixes: NixOS#4357
I want git submodules badly, so here is my equally bad attempt on adding support for them in flakes. TODO: - This now unconditionally adds submodules for all flake inputs. Do we want that? - This currently makes it equivalent to appending `?submodules=1` to the url. Do we want that? - Figure out how this can be done for `self`. - Add a test for the behaviour Fixes: NixOS#4357
It would also be good if it copied over submodules when building devShell for a local flake. A project I'm working on needs to reference files in a git submodule to make its devShell, but the flake for it doesn't work currently since |
It took me a while to parse through how - std::string _installable{"."};
+ std::string _installable{".?submodules=1"}; That would allow you to not have it be unconditional for all locally referenced repos. |
By the way, to add insult to injury, nix doesn't even tell that it's because you're using something from a submodule. It just says something like:
For context, that is if "mysubmodule" is a submodule of my current flake project managed in git and I'm using a file from that project somewhere. A file that physically exists on the drive, because the project repository was checked out recursively. |
Is your feature request related to a problem? Please describe.
Can't just add git url to inputs to fetch sources with submodules.
Describe the solution you'd like
A
recursive: bool
field in flake inputs available when url refers to a git repoDescribe alternatives you've considered
Not using flake.lock or flake inputs, but instead using
fetchFromGitHub
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: