python3.pkgs.cmsis-pack-manager: fix install using pypa installer
This commit is contained in:
parent
d2d2edea93
commit
9349b36b56
|
@ -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 = [
|
||||
|
|
Loading…
Reference in a new issue