Open bglgwyng opened 3 weeks ago
{
imports = [
({ lib, flake-parts-lib, ... }:
let
inherit (lib) mkOption types;
inherit (flake-parts-lib) mkTransposedPerSystemModule;
in mkTransposedPerSystemModule {
name = "debug2";
option = mkOption {
type = types.lazyAttrsOf types.bool;
default = { };
};
file = ./.;
})
];
The best solution I found so far is to put debug2
attribute manually in imports
. debug
is different from what I expected. Do we have such thing in default?
Did you find the debug
option?
I think it covers your needs. It adds to the flake outputs:
currentSystem
(perSystem
for builtins.currentSystem
if applicable)
currentSystem._module.args.pkgs
allSystems
debug
Using debug, I should define values for debugging purposes in REPL. Is it correct?
https://github.com/hercules-ci/flake-parts/issues/256#issuecomment-2449156316
This approach allows arbitrary properties inside perSystem.debug
.
What about adding this feature into the existing debug
option?
I'm debugging my flake-parts code with nix repl. To do this, I put custom values into
flake
attribute. However, sometimes I need values provided forperSystem
lambda likelib
,pkgs
to debug more conveniently. AFAIK, I can't add custom attributes insideperSystem
without adding custom options. It would be great if I could add attributes for debugging purpose intoperSystem
. Do we have any?