python312Packages.units-llnl: init at 0.13.1

This commit is contained in:
Doron Behar 2025-05-22 00:21:19 +03:00
parent ff6e587dbd
commit ce41489714
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,56 @@
{
lib,
buildPythonPackage,
units-llnl,
# build-system
nanobind,
scikit-build-core,
# nativeBuildInputs
cmake,
# NOTE that if top-level units-llnl package uses cmakeFlags other then
# Nixpkgs' default, the build might fail, and you'd want to pick only the
# cmakeFlags that don't cause a failure. See also:
# https://github.com/scipp/scipp/issues/3705
cmakeFlags ? units-llnl.cmakeFlags,
ninja,
}:
buildPythonPackage {
inherit (units-llnl)
pname
version
src
meta
;
pyproject = true;
build-system = [
nanobind
scikit-build-core
];
nativeBuildInputs = [
cmake
ninja
];
dontUseCmakeConfigure = true;
env = {
SKBUILD_CMAKE_ARGS = lib.strings.concatStringsSep ";" (
cmakeFlags
++ [
(lib.cmakeBool "UNITS_BUILD_PYTHON_LIBRARY" true)
]
);
};
# Also upstream turns off testing for the python build so it seems, see:
# https://github.com/LLNL/units/blob/v0.13.1/pyproject.toml#L65-L66 However
# they do seem to use pytest for their CI, but in our case it fails due to
# missing googletest Python modules, which we don't know how to build.
doCheck = false;
passthru = {
top-level = units-llnl;
};
}

View File

@ -18748,6 +18748,10 @@ self: super: with self; {
unique-log-filter = callPackage ../development/python-modules/unique-log-filter { };
units-llnl = callPackage ../development/python-modules/units-llnl {
inherit (pkgs) units-llnl;
};
unittest-data-provider = callPackage ../development/python-modules/unittest-data-provider { };
unittest-xml-reporting = callPackage ../development/python-modules/unittest-xml-reporting { };