about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/physics/pythia/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/physics/pythia/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/pythia/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/physics/pythia/default.nix b/nixpkgs/pkgs/development/libraries/physics/pythia/default.nix
new file mode 100644
index 000000000000..1bec3300f80a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/pythia/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, boost, fastjet, hepmc, lhapdf, rsync, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "pythia";
+  version = "8.303";
+
+  src = fetchurl {
+    url = "http://home.thep.lu.se/~torbjorn/pythia8/pythia${builtins.replaceStrings ["."] [""] version}.tgz";
+    sha256 = "0gli6zf8931i7kyminppisc9d0q69xxnalvhld5fgnkh4q82nz6d";
+  };
+
+  buildInputs = [ boost fastjet hepmc zlib rsync lhapdf ];
+
+  preConfigure = ''
+    patchShebangs ./configure
+  '';
+
+  configureFlags = [
+    "--enable-shared"
+    "--with-lhapdf6=${lhapdf}"
+  ] ++ (if lib.versions.major hepmc.version == "3" then [
+    "--with-hepmc3=${hepmc}"
+  ] else [
+    "--with-hepmc2=${hepmc}"
+  ]);
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "A program for the generation of high-energy physics events";
+    license     = lib.licenses.gpl2;
+    homepage    = "http://home.thep.lu.se/~torbjorn/Pythia.html";
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ veprbl ];
+  };
+}