Context
I have a project where I have two flakes:
./flake.nix
./nix-dev/flake.nix
./flake.nix uses inputs from ./nix-dev/flake.nix:
./nix-dev/flake.nix accesses files in ./ via the path:../ input:
Problem
In the current flake-compat implementation, the src coincides with rootSrc.
Therefore, if I set src to ./nix-dev, I get an error
at /nix/store/ndslvddkj5h37rn09ccnk9s8bzydcz3z-nix-dev/flake.nix:44:24:
43| parent = inputs.parent.outPath;
44| systemPlatform = import "${parent}/nix/systemPlatform.nix";
| ^
45| systems = builtins.attrNames systemPlatform;
error: access to absolute path '/nix/store/nix/systemPlatform.nix' is forbidden in pure evaluation mode (use '--impure' to override)
Solution
Introduce an additional argument to the main function in default.nix that will let a user specify the "root" within src, i.e. where the flake.nix is within src.
This suggestion is implemented in #90.
Context
I have a project where I have two flakes:
./flake.nix./nix-dev/flake.nix./flake.nixuses inputs from./nix-dev/flake.nix:./nix-dev/flake.nixaccesses files in./via thepath:../input:Problem
In the current
flake-compatimplementation, thesrccoincides withrootSrc.Therefore, if I set
srcto./nix-dev, I get an errorSolution
Introduce an additional argument to the main function in
default.nixthat will let a user specify the "root" withinsrc, i.e. where theflake.nixis withinsrc.This suggestion is implemented in #90.