Skip to content

Commit

Permalink
Use PATH variable from module system
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alecandido committed Feb 25, 2024
1 parent 7d3a1b8 commit 2a3eb0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2a3eb0c

Please sign in to comment.