nixpkgs/pkgs/applications/science/physics/sherpa/default.nix
2017-08-31 14:32:05 -04:00

37 lines
1.1 KiB
Nix

{ stdenv, fetchurl, gfortran, hepmc, fastjet, lhapdf, rivet, sqlite }:
stdenv.mkDerivation rec {
name = "sherpa-${version}";
version = "2.2.4";
src = fetchurl {
url = "http://www.hepforge.org/archive/sherpa/SHERPA-MC-${version}.tar.gz";
sha256 = "1rw0ivx78zkbkl7nwil9i4fn8rvkifc3i20zrq3asbi4kb6brj2x";
};
buildInputs = [ gfortran sqlite lhapdf rivet ];
enableParallelBuilding = true;
# LLVM 4 doesn't allow ambigous type in std::abs argument
patches = stdenv.lib.optional stdenv.cc.isClang [ ./explicit_overloads.patch ];
configureFlags = [
"--with-sqlite3=${sqlite.dev}"
"--enable-hepmc2=${hepmc}"
"--enable-fastjet=${fastjet}"
"--enable-lhapdf=${lhapdf}"
"--enable-rivet=${rivet}"
];
CXXFLAGS = "-std=c++11"; # needed for rivet on OSX
meta = {
description = "Simulation of High-Energy Reactions of PArticles in lepton-lepton, lepton-photon, photon-photon, lepton-hadron and hadron-hadron collisions";
license = stdenv.lib.licenses.gpl2;
homepage = https://sherpa.hepforge.org;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ veprbl ];
};
}