From 4c00f66ef6f937581c96206fdf154cbe05a7dea9 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 24 Apr 2021 08:41:51 -0400 Subject: [PATCH] pythonPackages.fastnlo_toolkit: init --- .../physics/fastnlo_toolkit/default.nix | 21 +++++++++++-------- pkgs/top-level/python-packages.nix | 5 +++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/physics/fastnlo_toolkit/default.nix b/pkgs/development/libraries/physics/fastnlo_toolkit/default.nix index cbea1abf0d0..e01638e285b 100644 --- a/pkgs/development/libraries/physics/fastnlo_toolkit/default.nix +++ b/pkgs/development/libraries/physics/fastnlo_toolkit/default.nix @@ -1,14 +1,16 @@ { lib , stdenv , fetchurl +, autoreconfHook , boost -, fastjet , gfortran , lhapdf -, python2 -, root +, ncurses +, python +, swig , yoda , zlib +, withPython ? false }: stdenv.mkDerivation rec { @@ -20,19 +22,20 @@ stdenv.mkDerivation rec { sha256 = "0fm9k732pmi3prbicj2yaq815nmcjll95fagjqzf542ng3swpqnb"; }; + nativeBuildInputs = lib.optional withPython autoreconfHook; + buildInputs = [ boost - fastjet gfortran gfortran.cc.lib lhapdf - python2 - root yoda - ]; + ] ++ lib.optional withPython python + ++ lib.optional (withPython && python.isPy3k) ncurses; + propagatedBuildInputs = [ zlib - ]; + ] ++ lib.optional withPython swig; preConfigure = '' substituteInPlace ./fastnlotoolkit/Makefile.in \ @@ -41,7 +44,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-yoda=${yoda}" - ]; + ] ++ lib.optional withPython "--enable-pyext"; enableParallelBuilding = true; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0671f45f80d..632713ec0b2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2373,6 +2373,11 @@ in { fastjsonschema = callPackage ../development/python-modules/fastjsonschema { }; + fastnlo_toolkit = toPythonModule (pkgs.fastnlo_toolkit.override { + withPython = true; + inherit python; + }); + fastpair = callPackage ../development/python-modules/fastpair { }; fastparquet = callPackage ../development/python-modules/fastparquet { };