1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

hepmc3: add python support

This commit is contained in:
Dmitry Kalinkin 2020-03-09 14:37:20 -04:00 committed by Jon
parent 1630cdd085
commit 61bc9e12a4
3 changed files with 19 additions and 4 deletions

View file

@ -1,4 +1,9 @@
{ stdenv, fetchurl, cmake, coreutils, root }:
{ stdenv, fetchurl, cmake, coreutils, python, root }:
let
pythonVersion = with stdenv.lib.versions; "${major python.version}${minor python.version}";
withPython = python != null;
in
stdenv.mkDerivation rec {
pname = "hepmc3";
@ -10,10 +15,14 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake ];
buildInputs = [ root ];
buildInputs = [ root ]
++ stdenv.lib.optional withPython python;
cmakeFlags = [
"-DHEPMC3_ENABLE_PYTHON=OFF"
"-DHEPMC3_ENABLE_PYTHON=${if withPython then "ON" else "OFF"}"
] ++ stdenv.lib.optionals withPython [
"-DHEPMC3_PYTHON_VERSIONS=${if python.isPy3k then "3.X" else "2.X"}"
"-DHEPMC3_Python_SITEARCH${pythonVersion}=${placeholder "out"}/${python.sitePackages}"
];
postInstall = ''

View file

@ -25153,7 +25153,9 @@ in
hepmc2 = callPackage ../development/libraries/physics/hepmc2 { };
hepmc3 = callPackage ../development/libraries/physics/hepmc3 { };
hepmc3 = callPackage ../development/libraries/physics/hepmc3 {
python = null;
};
herwig = callPackage ../development/libraries/physics/herwig { };

View file

@ -2256,6 +2256,10 @@ in {
jsonrpc-websocket = callPackage ../development/python-modules/jsonrpc-websocket { };
hepmc3 = toPythonModule (pkgs.hepmc3.override {
inherit python;
});
onkyo-eiscp = callPackage ../development/python-modules/onkyo-eiscp { };
tablib = callPackage ../development/python-modules/tablib { };