nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 59 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 boost, 6 fastjet, 7 fixDarwinDylibNames, 8 hepmc, 9 lhapdf, 10 rsync, 11 zlib, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "pythia"; 16 version = "8.315"; 17 18 src = fetchurl { 19 url = "https://pythia.org/download/pythia83/pythia${ 20 builtins.replaceStrings [ "." ] [ "" ] version 21 }.tgz"; 22 sha256 = "sha256-Sy/nNB4z6QtyJv3Koqe/kyeYezNU6EwE8f2SVoY2kK4="; 23 }; 24 25 nativeBuildInputs = [ rsync ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; 26 buildInputs = [ 27 boost 28 fastjet 29 hepmc 30 zlib 31 lhapdf 32 ]; 33 34 configureFlags = [ 35 "--enable-shared" 36 "--with-lhapdf6=${lhapdf}" 37 ] 38 ++ ( 39 if lib.versions.major hepmc.version == "3" then 40 [ 41 "--with-hepmc3=${hepmc}" 42 ] 43 else 44 [ 45 "--with-hepmc2=${hepmc}" 46 ] 47 ); 48 49 enableParallelBuilding = true; 50 51 meta = { 52 description = "Program for the generation of high-energy physics events"; 53 mainProgram = "pythia8-config"; 54 license = lib.licenses.gpl2Only; 55 homepage = "https://pythia.org"; 56 platforms = lib.platforms.unix; 57 maintainers = with lib.maintainers; [ veprbl ]; 58 }; 59}