diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/cmsis-pack-manager/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/cmsis-pack-manager/default.nix | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/cmsis-pack-manager/default.nix b/nixpkgs/pkgs/development/python-modules/cmsis-pack-manager/default.nix index 646fef8f47fa..6043f1c15565 100644 --- a/nixpkgs/pkgs/development/python-modules/cmsis-pack-manager/default.nix +++ b/nixpkgs/pkgs/development/python-modules/cmsis-pack-manager/default.nix @@ -1,5 +1,5 @@ { lib -, fetchPypi +, fetchFromGitHub , rustPlatform , cffi , libiconv @@ -15,17 +15,20 @@ }: buildPythonPackage rec { - pname = "cmsis_pack_manager"; + pname = "cmsis-pack-manager"; version = "0.5.2"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - hash = "sha256-sVfyz9D7/0anIp0bEPp1EJkERDbNJ3dCcydLbty1KsQ="; + src = fetchFromGitHub { + owner = "pyocd"; + repo = "cmsis-pack-manager"; + rev = "refs/tags/v${version}"; + hash = "sha256-PeyJf3TGUxv8/MKIQUgWrenrK4Hb+4cvtDA2h3r6kGg="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; - sha256 = "dO4qw5Jx0exwb4RuOhu6qvGxQZ+LayHtXDHZKADLTEI="; + hash = "sha256-dO4qw5Jx0exwb4RuOhu6qvGxQZ+LayHtXDHZKADLTEI="; }; nativeBuildInputs = [ rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook ]; @@ -35,10 +38,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ appdirs pyyaml ]; nativeCheckInputs = [ hypothesis jinja2 pytestCheckHook unzip ]; - format = "pyproject"; - + # remove cmsis_pack_manager source directory so that binaries can be imported + # from the installed wheel instead preCheck = '' - unzip $dist/*.whl cmsis_pack_manager/cmsis_pack_manager/native.so + rm -r cmsis_pack_manager ''; disabledTests = [ |