at master 1.2 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 cargo, 6 rustPlatform, 7 rustc, 8 setuptools, 9 setuptools-rust, 10 numpy, 11 fixtures, 12 networkx, 13 testtools, 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "rustworkx"; 19 version = "0.16.0"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "Qiskit"; 24 repo = "rustworkx"; 25 rev = version; 26 hash = "sha256-hzB99ReL1bTmj1mYne9rJp2rBeMnmIR17VQFVl7rzr0="; 27 }; 28 29 cargoDeps = rustPlatform.fetchCargoVendor { 30 inherit src; 31 hash = "sha256-9NMTGq8KzIvnOXrsUpFHrtM9K/E7RMrE/Aa9mtO7pTI="; 32 }; 33 34 nativeBuildInputs = [ 35 rustPlatform.cargoSetupHook 36 cargo 37 rustc 38 ]; 39 40 build-system = [ 41 setuptools 42 setuptools-rust 43 ]; 44 45 dependencies = [ numpy ]; 46 47 nativeCheckInputs = [ 48 fixtures 49 networkx 50 pytestCheckHook 51 testtools 52 ]; 53 54 preCheck = '' 55 rm -r rustworkx 56 ''; 57 58 pythonImportsCheck = [ "rustworkx" ]; 59 60 meta = with lib; { 61 description = "High performance Python graph library implemented in Rust"; 62 homepage = "https://github.com/Qiskit/rustworkx"; 63 license = licenses.asl20; 64 maintainers = with maintainers; [ raitobezarius ]; 65 }; 66}