Skip to content

Commit

Permalink
lhapdf: fix "lhapdf list" interactive tool (#44905)
Browse files Browse the repository at this point in the history
In version 6.2.1 the "list" command now uses python bindings, which need
to be imported, so we need to set the PYTHONPATH.
  • Loading branch information
veprbl authored and xeji committed Sep 24, 2018
1 parent 634c37c commit 8229fbb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkgs/development/libraries/physics/lhapdf/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, python2 }:
{ stdenv, fetchurl, python2, makeWrapper }:

stdenv.mkDerivation rec {
name = "lhapdf-${version}";
Expand All @@ -9,6 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0bi02xcmq5as0wf0jn6i3hx0qy0hj61m02sbrbzd1gwjhpccwmvd";
};

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python2 ];

enableParallelBuilding = true;
Expand All @@ -17,6 +18,10 @@ stdenv.mkDerivation rec {
pdf_sets = import ./pdf_sets.nix { inherit stdenv fetchurl; };
};

postInstall = ''
wrapProgram $out/bin/lhapdf --prefix PYTHONPATH : "$(toPythonPath "$out")"
'';

meta = {
description = "A general purpose interpolator, used for evaluating Parton Distribution Functions from discretised data files";
license = stdenv.lib.licenses.gpl2;
Expand Down

0 comments on commit 8229fbb

Please sign in to comment.