2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, boost, fastjet, hepmc, lhapdf, rsync, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pythia";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "8.306";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-10-28 06:52:43 +00:00
|
|
|
url = "https://pythia.org/download/pythia83/pythia${builtins.replaceStrings ["."] [""] version}.tgz";
|
|
|
|
sha256 = "sha256-c0gDtyKxwbU8jPLw08MHR8gPwt3l4LoUG8k5fa03qPY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [ rsync ];
|
|
|
|
buildInputs = [ boost fastjet hepmc zlib lhapdf ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs ./configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-shared"
|
|
|
|
"--with-lhapdf6=${lhapdf}"
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ (if lib.versions.major hepmc.version == "3" then [
|
2020-10-11 12:50:04 +00:00
|
|
|
"--with-hepmc3=${hepmc}"
|
|
|
|
] else [
|
|
|
|
"--with-hepmc2=${hepmc}"
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A program for the generation of high-energy physics events";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl2Only;
|
2021-10-28 06:52:43 +00:00
|
|
|
homepage = "https://pythia.org";
|
2021-05-20 23:08:51 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|