about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/physics/herwig/default.nix
blob: c5849f93c5e31c31a6312b8dc7bc41b76d09087b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib, stdenv, fetchurl, boost, fastjet, gfortran, gsl, lhapdf, thepeg, zlib, autoconf, automake, libtool }:

stdenv.mkDerivation rec {
  pname = "herwig";
  version = "7.3.0";

  src = fetchurl {
    url = "https://www.hepforge.org/archive/herwig/Herwig-${version}.tar.bz2";
    hash = "sha256-JiSBnS3/EFupUuobXPEutvSSbUlRd0pBkHaZ4vVnaGw=";
  };

  nativeBuildInputs = [ autoconf automake libtool gfortran ];

  buildInputs = [ boost fastjet gsl thepeg zlib ]
    # There is a bug that requires for default PDF's to be present during the build
    ++ (with lhapdf.pdf_sets; [ CT14lo CT14nlo ]);

  postPatch = ''
    patchShebangs ./

    # Fix failing "make install" being unable to find HwEvtGenInterface.so
    substituteInPlace src/defaults/decayers.in.in \
      --replace "read EvtGenDecayer.in" ""
  '';

  configureFlags = [
    "--with-thepeg=${thepeg}"
  ];

  enableParallelBuilding = true;

  meta = with lib; {
    description = "A multi-purpose particle physics event generator";
    homepage = "https://herwig.hepforge.org/";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ veprbl ];
    platforms = platforms.unix;
    broken = stdenv.isAarch64; # doesn't compile: ignoring return value of 'FILE* freopen...
  };
}