hepmc3: adjust format

This commit is contained in:
Shamrock Lee 2022-12-10 09:38:31 +08:00
parent e23f5f4f92
commit 682eac0d22

View file

@ -1,4 +1,11 @@
{ lib, stdenv, fetchurl, cmake, coreutils, python, root }:
{ lib
, stdenv
, fetchurl
, cmake
, coreutils
, python
, root
}:
let
pythonVersion = with lib.versions; "${major python.version}${minor python.version}";
@ -16,9 +23,14 @@ stdenv.mkDerivation rec {
sha256 = "sha256-zQ91yA91VJxZzCqCns52Acd96Xyypat1eQysjh1YUDI=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ root_py ]
++ lib.optional withPython python;
nativeBuildInputs = [
cmake
];
buildInputs = [
root_py
]
++ lib.optional withPython python;
cmakeFlags = [
"-DHEPMC3_ENABLE_PYTHON=${if withPython then "ON" else "OFF"}"