Skip to content

Commit 033faf0

Browse files
committed
Add lhapdf dependency, setup shell to ease its usage
1 parent d4f74da commit 033faf0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

flake.nix

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,25 @@
2121
forEachSystem
2222
(system: let
2323
pkgs = nixpkgs.legacyPackages.${system};
24+
pwd = builtins.getEnv "PWD";
25+
path = builtins.getEnv "PATH";
26+
prefix = "${pwd}/target/prefix";
27+
lhapath = "${prefix}/share/LHAPDF";
2428
in {
2529
default = devenv.lib.mkShell {
2630
inherit inputs pkgs;
2731
modules = [
2832
{
29-
packages = with pkgs; [maturin];
33+
packages = with pkgs; [maturin lhapdf];
34+
35+
env = {
36+
PREFIX = prefix;
37+
PATH = "${path}:${prefix}/bin";
38+
LHAPDF_DATA_PATH = lhapath;
39+
};
40+
enterShell = ''
41+
mkdir -p ${lhapath}
42+
'';
3043

3144
languages.python = {
3245
enable = true;

0 commit comments

Comments
 (0)