2021-03-16 14:27:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-11-09 00:15:18 +00:00
|
|
|
, fetchurl
|
2021-03-16 14:27:03 +00:00
|
|
|
, boost
|
|
|
|
, gfortran
|
|
|
|
, lhapdf
|
2021-04-24 12:41:51 +00:00
|
|
|
, ncurses
|
2021-07-31 00:36:32 +00:00
|
|
|
, perl
|
2021-07-27 13:37:32 +00:00
|
|
|
, python ? null
|
2021-04-24 12:41:51 +00:00
|
|
|
, swig
|
2021-03-16 14:27:03 +00:00
|
|
|
, yoda
|
|
|
|
, zlib
|
2021-04-24 12:41:51 +00:00
|
|
|
, withPython ? false
|
2021-03-16 14:27:03 +00:00
|
|
|
}:
|
2016-12-30 17:32:03 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "fastnlo_toolkit";
|
2021-11-09 00:15:18 +00:00
|
|
|
version = "2.5.0-2826";
|
2021-07-29 15:49:32 +00:00
|
|
|
|
2021-11-09 00:15:18 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://fastnlo.hepforge.org/code/v25/fastnlo_toolkit-${version}.tar.gz";
|
|
|
|
sha256 = "sha256-7aIMYCOkHC/17CHYiEfrxvtSJxTDivrS7BQ32cGiEy0=";
|
|
|
|
};
|
2021-04-24 12:41:51 +00:00
|
|
|
|
2021-03-16 14:27:03 +00:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
gfortran
|
|
|
|
gfortran.cc.lib
|
|
|
|
lhapdf
|
|
|
|
yoda
|
2021-04-24 12:41:51 +00:00
|
|
|
] ++ lib.optional withPython python
|
|
|
|
++ lib.optional (withPython && python.isPy3k) ncurses;
|
|
|
|
|
2021-03-16 14:27:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
zlib
|
2021-04-24 12:41:51 +00:00
|
|
|
] ++ lib.optional withPython swig;
|
2016-12-30 17:32:03 +00:00
|
|
|
|
2017-07-17 02:43:13 +00:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace ./fastnlotoolkit/Makefile.in \
|
|
|
|
--replace "-fext-numeric-literals" ""
|
2021-11-08 19:02:29 +00:00
|
|
|
|
|
|
|
# disable test that fails due to strict floating-point number comparison
|
|
|
|
echo "#!/usr/bin/env perl" > check/fnlo-tk-stattest.pl.in
|
|
|
|
chmod +x check/fnlo-tk-stattest.pl.in
|
2017-07-17 02:43:13 +00:00
|
|
|
'';
|
2017-01-09 07:24:27 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-yoda=${yoda}"
|
2021-04-24 12:41:51 +00:00
|
|
|
] ++ lib.optional withPython "--enable-pyext";
|
2017-01-09 07:24:27 +00:00
|
|
|
|
2016-12-30 17:32:03 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-07-31 00:36:32 +00:00
|
|
|
doCheck = true;
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-31 00:36:32 +00:00
|
|
|
perl
|
|
|
|
lhapdf.pdf_sets.CT10nlo
|
|
|
|
];
|
|
|
|
preCheck = ''
|
|
|
|
patchShebangs --build check
|
|
|
|
'';
|
|
|
|
enableParallelChecking = false;
|
|
|
|
|
2021-03-16 14:27:03 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://fastnlo.hepforge.org";
|
|
|
|
description = "Fast pQCD calculations for hadron-induced processes";
|
|
|
|
longDescription = ''
|
|
|
|
The fastNLO project provides computer code to create and evaluate fast
|
|
|
|
interpolation tables of pre-computed coefficients in perturbation theory
|
|
|
|
for observables in hadron-induced processes.
|
|
|
|
|
|
|
|
This allows fast theory predictions of these observables for arbitrary
|
|
|
|
parton distribution functions (of regular shape), renormalization or
|
|
|
|
factorization scale choices, and/or values of alpha_s(Mz) as e.g. needed
|
|
|
|
in PDF fits or in systematic studies. Very time consuming complete
|
|
|
|
recalculations are thus avoided.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
platforms = platforms.unix;
|
2016-12-30 17:32:03 +00:00
|
|
|
};
|
|
|
|
}
|