@@ -1,38 +1,44 @@
11{ lib
22, stdenv
33, fetchurl
4+, autoreconfHook
45, boost
5−, fastjet
66, gfortran
77, lhapdf
8−, python2
9−, root
8+, ncurses
9+, python
10+, swig
1011, yoda
1112, zlib
13+, withPython ? false
1214}:
1315
1416stdenv.mkDerivation rec {
1517 pname = "fastnlo_toolkit";
16− version = "2.3.1pre-2402";
18+ version = "2.3.1pre-2411";
1719
1820 src = fetchurl {
19− url = "https://fastnlo.hepforge.org/code/v23/${pname}-${version}.tar.gz";
20− sha256 = "1h41xnqcz401x3zbs8i2dsb4xlhbv8i5ps0561p6y7gcyridgcbl";
21+ urls = [
22+ "https://fastnlo.hepforge.org/code/v23/${pname}-${version}.tar.gz"
23+ "https://sid.ethz.ch/debian/fastnlo/${pname}-${version}.tar.gz"
24+ ];
25+ sha256 = "0fm9k732pmi3prbicj2yaq815nmcjll95fagjqzf542ng3swpqnb";
2126 };
2227
28+ nativeBuildInputs = lib.optional withPython autoreconfHook;
29+
2330 buildInputs = [
2431 boost
25− fastjet
2632 gfortran
2733 gfortran.cc.lib
2834 lhapdf
29− python2
30− root
3135 yoda
32− ];
36+ ] ++ lib.optional withPython python
37+ ++ lib.optional (withPython && python.isPy3k) ncurses;
38+
3339 propagatedBuildInputs = [
3440 zlib
35− ];
41+ ] ++ lib.optional withPython swig;
3642
3743 preConfigure = ''
3844 substituteInPlace ./fastnlotoolkit/Makefile.in \
@@ -41,7 +47,7 @@ stdenv.mkDerivation rec {
4147
4248 configureFlags = [
4349 "--with-yoda=${yoda}"
44− ];
50+ ] ++ lib.optional withPython "--enable-pyext";
4551
4652 enableParallelBuilding = true;
4753