nhost-cli: 1.28.2 -> 1.28.3 (#372273)
[NixPkgs.git] / pkgs / development / python-modules / rustworkx / default.nix
blobd2ee15fa36b168f3345cba675b3dca72ce1b3942
2   fetchFromGitHub,
3   buildPythonPackage,
4   cargo,
5   rustPlatform,
6   rustc,
7   setuptools,
8   setuptools-rust,
9   numpy,
10   fixtures,
11   networkx,
12   testtools,
13   libiconv,
14   stdenv,
15   lib,
16   pytestCheckHook,
19 buildPythonPackage rec {
20   pname = "rustworkx";
21   version = "0.15.1";
22   pyproject = true;
24   src = fetchFromGitHub {
25     owner = "Qiskit";
26     repo = "rustworkx";
27     rev = version;
28     hash = "sha256-0WYgShihTBM0e+MIhON0dnhZug6l280tZcVp3KF1Jq0=";
29   };
31   cargoDeps = rustPlatform.fetchCargoTarball {
32     inherit src;
33     hash = "sha256-AgHfCKLna30WERAFGEs8yRxxZHwvLzR+/S+ivwKHXXE=";
34   };
36   nativeBuildInputs = [
37     rustPlatform.cargoSetupHook
38     cargo
39     rustc
40   ];
42   build-system = [
43     setuptools
44     setuptools-rust
45   ];
47   buildInputs = [ numpy ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
49   nativeCheckInputs = [
50     fixtures
51     networkx
52     pytestCheckHook
53     testtools
54   ];
56   preCheck = ''
57     rm -r rustworkx
58   '';
60   pythonImportsCheck = [ "rustworkx" ];
62   meta = with lib; {
63     description = "High performance Python graph library implemented in Rust";
64     homepage = "https://github.com/Qiskit/rustworkx";
65     license = licenses.asl20;
66     maintainers = with maintainers; [ raitobezarius ];
67   };