2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchurl, gfortran, hoppet, lhapdf, root5, zlib }:
|
2018-09-24 20:29:29 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "applgrid";
|
2018-09-24 20:29:29 +02:00
|
|
|
version = "1.4.70";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://www.hepforge.org/archive/applgrid/${pname}-${version}.tgz";
|
2018-09-24 20:29:29 +02:00
|
|
|
sha256 = "1yw9wrk3vjv84kd3j4s1scfhinirknwk6xq0hvj7x2srx3h93q9p";
|
|
|
|
};
|
|
|
|
|
2021-09-03 13:33:33 +02:00
|
|
|
nativeBuildInputs = [ gfortran ];
|
|
|
|
|
2019-11-25 04:51:49 +01:00
|
|
|
# For some reason zlib was only needed after bump to gfortran8
|
2021-09-03 13:33:33 +02:00
|
|
|
buildInputs = [ hoppet lhapdf root5 zlib ];
|
2018-09-24 20:29:29 +02:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
./bad_code.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace src/Makefile.in \
|
|
|
|
--replace "-L\$(subst /libgfortran.a, ,\$(FRTLIB) )" "-L${gfortran.cc.lib}/lib"
|
|
|
|
'' + (if stdenv.isDarwin then ''
|
|
|
|
substituteInPlace src/Makefile.in \
|
|
|
|
--replace "gfortran -print-file-name=libgfortran.a" "gfortran -print-file-name=libgfortran.dylib"
|
|
|
|
'' else "");
|
|
|
|
|
|
|
|
enableParallelBuilding = false; # broken
|
|
|
|
|
|
|
|
# Install private headers required by APFELgrid
|
|
|
|
postInstall = ''
|
|
|
|
for header in src/*.h; do
|
|
|
|
install -Dm644 "$header" "$out"/include/appl_grid/"`basename $header`"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2018-09-24 20:29:29 +02:00
|
|
|
description = "The APPLgrid project provides a fast and flexible way to reproduce the results of full NLO calculations with any input parton distribution set in only a few milliseconds rather than the weeks normally required to gain adequate statistics";
|
|
|
|
license = licenses.gpl3;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://applgrid.hepforge.org";
|
2018-09-24 20:29:29 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|