2023-04-12 12:48:02 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
2023-04-12 12:48:02 +00:00
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustc
|
2023-04-12 12:48:02 +00:00
|
|
|
, setuptools-rust
|
|
|
|
, numpy
|
|
|
|
, fixtures
|
|
|
|
, networkx
|
2023-08-10 07:59:29 +00:00
|
|
|
, testtools
|
2023-04-12 12:48:02 +00:00
|
|
|
, libiconv
|
|
|
|
, stdenv
|
|
|
|
, lib
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rustworkx";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.13.1";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Qiskit";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-WwQuvRMDGiY9VrWPfxL0OotPCUhCsvbXoVSCNhmIF/g=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-QuzBJyM83VtB6CJ7i9/SFE8h6JbxkX/LQ9lOFSQIidU=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-rust
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
buildInputs = [ numpy ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
checkInputs = [ fixtures networkx testtools ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "rustworkx" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-08-10 07:59:29 +00:00
|
|
|
description = "A high performance Python graph library implemented in Rust";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://github.com/Qiskit/rustworkx";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ raitobezarius ];
|
|
|
|
};
|
|
|
|
}
|