2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gfortran
|
|
|
|
, lhapdf
|
|
|
|
, python3
|
|
|
|
, swig
|
|
|
|
, zlib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "apfel";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scarrazza";
|
|
|
|
repo = "apfel";
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-0Ix7KwEZUG/NmGJ380DVJbUA0PcoEJDlcGSc09l5Tbc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/scarrazza/apfel/pull/54
|
|
|
|
./cmake.patch
|
|
|
|
];
|
2022-11-02 22:02:43 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
swig
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
gfortran
|
|
|
|
lhapdf
|
|
|
|
python3
|
|
|
|
zlib
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DAPFEL_DOWNLOAD_PDFS=OFF"
|
|
|
|
"-DAPFEL_Python_SITEARCH=autoprefix"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
nativeCheckInputs = [
|
|
|
|
lhapdf.pdf_sets.NNPDF23_nlo_as_0118
|
|
|
|
lhapdf.pdf_sets.NNPDF31_nnlo_as_0118
|
|
|
|
];
|
|
|
|
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-DAPFEL_VERSION=${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "PDF Evolution Library";
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://apfel.mi.infn.it/";
|
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ veprbl ];
|
2024-01-02 11:29:13 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|