summary refs log tree commit diff
path: root/pkgs/development/libraries/physics/mcgrid/default.nix
blob: 74b4ba4224e78e5b34bb6fd6414d6f5f42d7737d (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
{ stdenv, fetchurl, fastnlo, rivet, pkgconfig }:

stdenv.mkDerivation rec {
  pname = "mcgrid";
  version = "2.0.2";

  src = fetchurl {
    url = "https://www.hepforge.org/archive/mcgrid/${pname}-${version}.tar.gz";
    sha256 = "1mw82x7zqbdchnd6shj3dirsav5i2cndp2hjwb8a8xdh4xh9zvfy";
  };

  buildInputs = [ fastnlo rivet ];
  propagatedNativeBuildInputs = [ pkgconfig ];

  preConfigure = ''
    substituteInPlace mcgrid.pc.in \
      --replace "Cflags:" "Cflags: -std=c++11"
  '';

  CXXFLAGS = "-std=c++11";
  enableParallelBuilding = true;

  meta = {
    description = "A software package that provides access to the APPLgrid and fastNLO interpolation tools for Monte Carlo event generator codes, allowing for fast and flexible variations of scales, coupling parameters and PDFs in cutting edge leading- and next-to-leading-order QCD calculations";
    license     = stdenv.lib.licenses.gpl3;
    homepage    = http://mcgrid.hepforge.org;
    platforms   = stdenv.lib.platforms.unix;
    maintainers = with stdenv.lib.maintainers; [ veprbl ];
  };
}