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