at 25.11-pre 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonAtLeast, 5 fetchFromGitHub, 6 rustPlatform, 7 numpy, 8 pytestCheckHook, 9 syrupy, 10}: 11 12buildPythonPackage rec { 13 pname = "quil"; 14 version = "0.16.0"; 15 pyproject = true; 16 17 # error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12) 18 disabled = pythonAtLeast "3.13"; 19 20 src = fetchFromGitHub { 21 owner = "rigetti"; 22 repo = "quil-rs"; 23 tag = "quil-py/v${version}"; 24 hash = "sha256-sj+JjE6y+toIjHO1J2g+3gzQMcfSa6zzQeOySATU48w="; 25 }; 26 27 cargoDeps = rustPlatform.fetchCargoVendor { 28 inherit pname version src; 29 hash = "sha256-0KZikbCJgg4prR9XxfCJcZOTiV2Hcob2zLurxqCkH6I="; 30 }; 31 32 buildAndTestSubdir = "quil-py"; 33 34 nativeBuildInputs = [ 35 rustPlatform.cargoSetupHook 36 rustPlatform.maturinBuildHook 37 ]; 38 39 dependencies = [ numpy ]; 40 41 pythonImportsCheck = [ 42 "quil.expression" 43 "quil.instructions" 44 "quil.program" 45 "quil.validation" 46 ]; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 syrupy 51 ]; 52 53 meta = { 54 changelog = "https://github.com/rigetti/quil-rs/blob/${src.tag}/quil-py/CHANGELOG.md"; 55 description = "Python package for building and parsing Quil programs"; 56 homepage = "https://github.com/rigetti/quil-rs/tree/main/quil-py"; 57 license = lib.licenses.asl20; 58 maintainers = with lib.maintainers; [ dotlambda ]; 59 }; 60}