From 033faf0ab507081550cd6d81333a39a400df9a06 Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Sat, 24 Feb 2024 15:20:54 +0100 Subject: [PATCH] Add lhapdf dependency, setup shell to ease its usage --- flake.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index dc2b473c..7dd8a186 100644 --- a/flake.nix +++ b/flake.nix @@ -21,12 +21,25 @@ forEachSystem (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 = [ { - packages = with pkgs; [maturin]; + packages = with pkgs; [maturin lhapdf]; + + env = { + PREFIX = prefix; + PATH = "${path}:${prefix}/bin"; + LHAPDF_DATA_PATH = lhapath; + }; + enterShell = '' + mkdir -p ${lhapath} + ''; languages.python = { enable = true;