From 2a3eb0c3f2837fe52623e70f8a8ff7cec27f2243 Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Sun, 25 Feb 2024 10:28:16 +0100 Subject: [PATCH] Use PATH variable from module system If taken directly from the environment, it will lose all the additions made by the Nix packages Accessing the value from the configuration will always improve self-consistency --- flake.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 89d7c428..a979095f 100644 --- a/flake.nix +++ b/flake.nix @@ -22,14 +22,15 @@ (system: let pkgs = nixpkgs.legacyPackages.${system}; pwd = builtins.getEnv "PWD"; - path = builtins.getEnv "PATH"; prefix = "${pwd}/target/prefix"; lhapath = "${prefix}/share/LHAPDF"; in { default = devenv.lib.mkShell { inherit inputs pkgs; modules = [ - ({config, ...}: { + ({config, ...}: let + path = config.system.path; + in { packages = with pkgs; [ maturin (lhapdf.override {