Using a flake that has inputs.self.submodules
as an input doesn't work #970
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#970
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Consider a flake called child that sets
inputs.self.submodules = true
. Trying to use this flake as an input for another flake results in this error:Steps To Reproduce
15a42d21a
flake-self-attrs
nix flake metadata "https://git.lix.systems/gepbird/submodules-imported-flake/archive/main.tar.gz"
Expected behavior
Just like running
nix flake metadata
in the child flake, it should return the usual Resolved URL, Locked URL and other metadata.nix --version
outputNote: I added
15a42d21a
as a patch to the 2.93.3 lix package, it's not shown in the output below.Additional context
My use case is having a public dotfiles flake (child) that sets
self.inputs.submodules = true
, because it has a git submodule that points to a private dotfiles-work flake. Trying to use this dotfiles flake as an input to one of my server flakes (parent) will fail with the above error.As a workaround I'm not specifying submodules in the flake, but build my system with a rather long and ugly command:
nom build ".?submodules=1#nixosConfigurations.$(hostname).config.system.build.toplevel" && sudo result/bin/switch-to-configuration switch
.cc @janw4ld @jade
you're using a version before this feature was implemented. try lix HEAD. here: https://wiki.lix.systems/books/lix-contributors/page/running-lix-main, or if you just want to test it temporarily,
nix build .#
in the lix repo.however, I'm leaving this open to give you time so you can make sure our implementation actually works on your code.
@jade I think you missed
:)
Just to be sure, I also tried it on main, and I got a slightly different error message: