Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 68 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 pythonOlder, 6 fetchFromGitHub, 7 rustPlatform, 8 numpy, 9 pytestCheckHook, 10 syrupy, 11 libiconv, 12}: 13 14buildPythonPackage rec { 15 pname = "quil"; 16 version = "0.13.2"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "rigetti"; 23 repo = "quil-rs"; 24 rev = "quil-py/v${version}"; 25 hash = "sha256-Hapj90F5IloyW7MyeTg95rlUfb4JiZdtz1HuJVxlk/c="; 26 }; 27 28 cargoDeps = rustPlatform.fetchCargoVendor { 29 inherit pname version src; 30 hash = "sha256-yfO1/ChiFYTB/LWCc9CR3lBzU71FEos+jjkHVoJyoeI="; 31 }; 32 33 buildAndTestSubdir = "quil-py"; 34 35 build-system = [ 36 rustPlatform.cargoSetupHook 37 rustPlatform.maturinBuildHook 38 ]; 39 40 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; 41 42 dependencies = [ numpy ]; 43 44 pythonImportsCheck = [ 45 "quil.expression" 46 "quil.instructions" 47 "quil.program" 48 "quil.validation" 49 ]; 50 51 nativeCheckInputs = [ 52 pytestCheckHook 53 syrupy 54 ]; 55 56 disabledTests = [ 57 # Syrupy snapshot needs to be regenerated 58 "test_filter_instructions" 59 ]; 60 61 meta = { 62 changelog = "https://github.com/rigetti/quil-rs/blob/${src.rev}/quil-py/CHANGELOG.md"; 63 description = "Python package for building and parsing Quil programs"; 64 homepage = "https://github.com/rigetti/quil-rs/tree/main/quil-py"; 65 license = lib.licenses.asl20; 66 maintainers = with lib.maintainers; [ dotlambda ]; 67 }; 68}