Add "submodules" as a flake attribute #929

Closed
opened 2025-07-23 08:38:44 +00:00 by pho · 4 comments

If a flake needs to initialize git submodules, you need to include '.?submodules=true' in the CLI invocation, which is a burden to remember, type and confusing for new users

Describe the solution you'd like

Being able to define this parameter within the flake itself.

Describe alternatives you've considered

nixcpp added this feature in the 2.27.0 release:

{
  inputs.self.submodules = true;
}

https://discourse.nixos.org/t/nix-2-27-0-released/62003

## Is your feature request related to a problem? Please describe. If a flake needs to initialize git submodules, you need to include `'.?submodules=true'` in the CLI invocation, which is a burden to remember, type and confusing for new users ## Describe the solution you'd like Being able to define this parameter within the flake itself. ## Describe alternatives you've considered nixcpp added this feature in the 2.27.0 release: ``` { inputs.self.submodules = true; } ``` https://discourse.nixos.org/t/nix-2-27-0-released/62003
Owner

I feel like this is a duplicate of some issue, to which the response was "that's a bad idea, it will make you fetch the entire repo twice which will take forever! plus it's in libfetchers which is extremely fragile and breakable. plus it's a flake thing! I'm sure not going to implement it but if someone sends an implementation to me with tests and it's clear it won't break anything then I'll merge it".

I feel like this is a duplicate of some issue, to which the response was "that's a bad idea, it will make you fetch the entire repo twice which will take forever! plus it's in libfetchers which is extremely fragile and breakable. plus it's a flake thing! I'm sure not going to implement it but if someone sends an implementation to me with tests and it's clear it won't break anything then I'll merge it".
Owner

My guess is it was a discussion on matrix, thanks for filing a bug!

My guess is it was a discussion on matrix, thanks for filing a bug!
implemented in https://gerrit.lix.systems/c/lix/+/3839
Owner

Fixed by cl/3839.

Fixed by cl/3839.
raito closed this issue 2025-08-18 10:18:15 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#929
No description provided.