Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 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.313"; 17 18 src = fetchurl { 19 url = "https://pythia.org/download/pythia83/pythia${ 20 builtins.replaceStrings [ "." ] [ "" ] version 21 }.tgz"; 22 sha256 = "sha256-0H6AFQHE3LdtlI3GMoU3X1l0U8HW7GXnEodgPcd2cYw="; 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 = with lib; { 52 description = "Program for the generation of high-energy physics events"; 53 mainProgram = "pythia8-config"; 54 license = licenses.gpl2Only; 55 homepage = "https://pythia.org"; 56 platforms = platforms.unix; 57 maintainers = with maintainers; [ veprbl ]; 58 }; 59}