Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, fetchPypi 3, rustPlatform 4, cffi 5, libiconv 6, stdenv 7, darwin 8, buildPythonPackage 9, appdirs 10, pyyaml 11, hypothesis 12, jinja2 13, pytestCheckHook 14, unzip 15}: 16 17buildPythonPackage rec { 18 pname = "cmsis_pack_manager"; 19 version = "0.5.2"; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-sVfyz9D7/0anIp0bEPp1EJkERDbNJ3dCcydLbty1KsQ="; 24 }; 25 26 cargoDeps = rustPlatform.fetchCargoTarball { 27 inherit src; 28 sha256 = "dO4qw5Jx0exwb4RuOhu6qvGxQZ+LayHtXDHZKADLTEI="; 29 }; 30 31 nativeBuildInputs = [ rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook ]; 32 propagatedNativeBuildInputs = [ cffi ]; 33 buildInputs = [ libiconv ] 34 ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; 35 propagatedBuildInputs = [ appdirs pyyaml ]; 36 nativeCheckInputs = [ hypothesis jinja2 pytestCheckHook unzip ]; 37 38 format = "pyproject"; 39 40 preCheck = '' 41 unzip $dist/*.whl cmsis_pack_manager/cmsis_pack_manager/native.so 42 ''; 43 44 disabledTests = [ 45 # All require DNS. 46 "test_pull_pdscs" 47 "test_install_pack" 48 "test_pull_pdscs_cli" 49 "test_dump_parts_cli" 50 ]; 51 52 meta = with lib; { 53 description = "A Rust and Python module for handling CMSIS Pack files"; 54 homepage = "https://github.com/pyocd/cmsis-pack-manager"; 55 license = licenses.asl20; 56 maintainers = with maintainers; [ frogamic sbruder ]; 57 }; 58}