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)
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.