You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just spent about an hour figuring out how to properly import the language/c and language/rust "extra" modules in my flake-parts based project flake, and how to set these up such that my project compiles.
To that end, it would have been very useful to have documentation for the following:
On what level exactly to put the import paths to pull in the extra/language/c.nix &c paths
On what level exactly to set language.c.include and friends
That language.* can be set but won't have any effect without those imports at exactly the right level in the first place.
This is similar to #283; I wish I'd guessed right the first time, instead I spent a while debugging inscrutable error messages.
Putting the "${inputs.devshell}/extra/language/rust.nix" import at the mkFlake level (errors with "attribute 'pkgs' missing").
Putting language.c.includes at the devshells level (with or without import): No error, no effect. With that in place, the whole setup masks this additional problem (where things "should" work but don't):
Putting that import at the devshells level (outside the default): No error, no effect
Adjust the worked example in https://numtide.github.io/devshell/extending.html indicating the exact layer at which imports need to go, with the concrete paths (is there a . extraModulesDir these days? I see it referenced in issues, but it wasn't defined in my setup.
Describe the bug
I've just spent about an hour figuring out how to properly import the language/c and language/rust "extra" modules in my flake-parts based project flake, and how to set these up such that my project compiles.
To that end, it would have been very useful to have documentation for the following:
extra/language/c.nix
&c pathslanguage.c.include
and friendslanguage.*
can be set but won't have any effect without those imports at exactly the right level in the first place.This is similar to #283; I wish I'd guessed right the first time, instead I spent a while debugging inscrutable error messages.
To Reproduce
This flake definition works:
However, the following things do not:
"${inputs.devshell}/extra/language/rust.nix"
import at the mkFlake level (errors with "attribute 'pkgs' missing").language.c.includes
at thedevshells
level (with or without import): No error, no effect. With that in place, the whole setup masks this additional problem (where things "should" work but don't):devshells
level (outside the default): No error, no effectExpected behavior
Some things that would have made my life easier:
imports
need to go, with the concrete paths (is there a. extraModulesDir
these days? I see it referenced in issues, but it wasn't defined in my setup.System information
flake-parts
34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5
devshell
44ddedcbcfc2d52a76b64fb6122f209881bd3e1e
Additional context
The text was updated successfully, but these errors were encountered: