evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / clarabel / default.nix
blobf6e4e09edc7cc80f4bc40f26d353917ea754abc8
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchPypi,
6   rustPlatform,
7   libiconv,
8   numpy,
9   scipy,
10   nix-update-script,
13 buildPythonPackage rec {
14   pname = "clarabel";
15   version = "0.9.0";
16   pyproject = true;
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-DW0/6IAL5bS11AqOFL1JJmez5GzF2+N2d85e0l8HGdQ=";
21   };
23   cargoDeps = rustPlatform.fetchCargoTarball {
24     inherit src;
25     name = "${pname}-${version}";
26     hash = "sha256-NNvrDXBodrO3bxr4X1HEn5uHmHDJ1s9C70lPv7OkSCo=";
27   };
29   nativeBuildInputs = with rustPlatform; [
30     cargoSetupHook
31     maturinBuildHook
32   ];
34   buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
36   propagatedBuildInputs = [
37     numpy
38     scipy
39   ];
41   pythonImportsCheck = [ "clarabel" ];
43   # no tests but run the same examples as .github/workflows/pypi.yaml
44   checkPhase = ''
45     runHook preCheck
46     python examples/python/example_sdp.py
47     python examples/python/example_qp.py
48     runHook postCheck
49   '';
51   passthru.updateScript = nix-update-script { };
53   meta = {
54     changelog = "https://github.com/oxfordcontrol/Clarabel.rs/releases/tag/v${version}/CHANGELOG.md";
55     description = "Conic Interior Point Solver";
56     homepage = "https://github.com/oxfordcontrol/Clarabel.rs";
57     license = lib.licenses.asl20;
58     maintainers = [ ];
59   };