2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
cargo,
|
|
|
|
rustPlatform,
|
|
|
|
rustc,
|
|
|
|
setuptools-rust,
|
|
|
|
numpy,
|
|
|
|
fixtures,
|
|
|
|
networkx,
|
|
|
|
testtools,
|
|
|
|
libiconv,
|
|
|
|
stdenv,
|
|
|
|
lib,
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rustworkx";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.14.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Qiskit";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-gck5X6J4Yg5it/YCBsk/yZ5qXg/iwCEbyDIKfBTRxHM=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-FNCa5pshcnsYpjlz6yDITe2k0cHLTybj3rF34qrsRVU=";
|
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 ];
|
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
|
|
|
};
|
|
|
|
}
|