Skip to content
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

Allow specifying ?submodules=1 for the current flake inside the flake.nix, and maybe make it the default? #9842

Closed
NorfairKing opened this issue Jan 24, 2024 · 2 comments
Labels
feature Feature request or proposal

Comments

@NorfairKing
Copy link

Is your feature request related to a problem? Please describe.

I can run nix build .?submodules=1 but not declare that inside the flake.nix

Describe the solution you'd like

A top-level attribute submodules = true; inside the flake.

Describe alternatives you've considered

Stop using submodules.

Additional context

Maybe this should be the default?

Priorities

👍

@NorfairKing NorfairKing added the feature Feature request or proposal label Jan 24, 2024
@AshleyYakeley
Copy link

See #5312

edolstra added a commit to DeterminateSystems/nix-src that referenced this issue Feb 4, 2025
This allows a flake to specify that it needs Git submodules to be
enabled (or disabled, if we ever change the default) on the top-level
flake. This requires the input to be refetched, but since the first
fetch is lazy, this shouldn't be expensive.

Currently the only attribute allowed by `inputs.self` is `submodules`,
but more can be added in the future (e.g. a `lazy` attribute to opt in
to lazy tree behaviour).

Fixes NixOS#5312, NixOS#9842.
@MattSturgeon
Copy link

Should've been closed by #12421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal
Projects
None yet
Development

No branches or pull requests

4 participants