summary refs log tree commit diff
path: root/pkgs/development/libraries/physics/lhapdf/default.nix
blob: dff9fb1c1dd111f0a3aa26f5908e0c56da864d49 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchurl, python2, makeWrapper }:

stdenv.mkDerivation rec {
  pname = "lhapdf";
  version = "6.2.3";

  src = fetchurl {
    url = "https://www.hepforge.org/archive/lhapdf/LHAPDF-${version}.tar.gz";
    sha256 = "1l9dv37k4jz18wahyfm9g53nyl81v5bgqgy4dllbcmvcqpfkmrnn";
  };

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

  enableParallelBuilding = true;

  passthru = {
    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;
    homepage    = http://lhapdf.hepforge.org;
    platforms   = stdenv.lib.platforms.unix;
    maintainers = with stdenv.lib.maintainers; [ veprbl ];
  };
}