nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 boost,
6 fastjet,
7 gfortran,
8 gsl,
9 lhapdf,
10 thepeg,
11 zlib,
12 autoconf,
13 automake,
14 libtool,
15}:
16
17stdenv.mkDerivation rec {
18 pname = "herwig";
19 version = "7.3.0";
20
21 src = fetchurl {
22 url = "https://www.hepforge.org/archive/herwig/Herwig-${version}.tar.bz2";
23 hash = "sha256-JiSBnS3/EFupUuobXPEutvSSbUlRd0pBkHaZ4vVnaGw=";
24 };
25
26 nativeBuildInputs = [
27 autoconf
28 automake
29 libtool
30 gfortran
31 ];
32
33 buildInputs = [
34 boost
35 fastjet
36 gsl
37 thepeg
38 zlib
39 ]
40 # There is a bug that requires for default PDF's to be present during the build
41 ++ (with lhapdf.pdf_sets; [
42 CT14lo
43 CT14nlo
44 ]);
45
46 postPatch = ''
47 patchShebangs ./
48
49 # Fix failing "make install" being unable to find HwEvtGenInterface.so
50 substituteInPlace src/defaults/decayers.in.in \
51 --replace "read EvtGenDecayer.in" ""
52 '';
53
54 configureFlags = [
55 "--with-thepeg=${thepeg}"
56 ];
57
58 enableParallelBuilding = true;
59
60 meta = with lib; {
61 description = "Multi-purpose particle physics event generator";
62 homepage = "https://herwig.hepforge.org/";
63 license = licenses.gpl3Only;
64 maintainers = with maintainers; [ veprbl ];
65 platforms = platforms.unix;
66 broken = stdenv.hostPlatform.isAarch64; # doesn't compile: ignoring return value of 'FILE* freopen...
67 };
68}