Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879{ lib, stdenv, pkgs, buildPythonPackage,
# build-system cmake, ninja, pip, setuptools,
# nativeBuildInputs openmpi,
# dependencies numpy,
mpiSupport ? false,}:let conduit = pkgs.conduit.override { inherit mpiSupport; };inbuildPythonPackage { inherit (conduit) pname version src # nativeBuildInputs buildInputs ; pyproject = true; __structuredAttrs = true;
postPatch = (conduit.postPatch or "") + '' substituteInPlace pyproject.toml \ --replace-fail \ "cmake<=3.30.0" \ "cmake" '';
env.ENABLE_MPI = mpiSupport;
build-system = [ cmake ninja pip setuptools ]; dontUseCmakeConfigure = true;
nativeBuildInputs = conduit.nativeBuildInputs ++ [ # openmpi needs to be in nativeBuildInputs, otherwise cmake can't find it openmpi ];
dependencies = [ numpy ];
pythonImportsCheck = [ "conduit" ];
# No python tests doCheck = false;
meta = { description = "Python bindings for the conduit library"; inherit (conduit.meta) homepage changelog license platforms ; maintainers = with lib.maintainers; [ GaetanLepage ]; # Cross-compilation is broken broken = stdenv.hostPlatform != stdenv.buildPlatform; };}