lhapdf: fix "lhapdf list" interactive tool (#44905)

In version 6.2.1 the "list" command now uses python bindings, which need
to be imported, so we need to set the PYTHONPATH.
This commit is contained in:
Dmitry Kalinkin
2018-09-24 16:37:44 -04:00
committed by xeji
parent 634c37cb83
commit 8229fbb486

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, python2 }:
{ stdenv, fetchurl, python2, makeWrapper }:
stdenv.mkDerivation rec {
name = "lhapdf-${version}";
@@ -9,6 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0bi02xcmq5as0wf0jn6i3hx0qy0hj61m02sbrbzd1gwjhpccwmvd";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python2 ];
enableParallelBuilding = true;
@@ -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;