depot/third_party/nixpkgs/pkgs/development/python-modules/stm32loader/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

55 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
# build-system
flit-core,
# dependenices
progress,
pyserial,
# optional-dependencies
intelhex,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "stm32loader";
version = "0.7.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-QTLSEjdJtDH4GCamnKHN5pEjW41rRtAMXxyZZMM5K3w=";
};
nativeBuildInputs = [ flit-core ];
propagatedBuildInputs = [
progress
pyserial
];
passthru.optional-dependencies = {
hex = [ intelhex ];
};
nativeCheckInputs = [
pytestCheckHook
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
pytestFlagsArray = [ "tests/unit" ];
meta = with lib; {
description = "Flash firmware to STM32 microcontrollers in Python";
mainProgram = "stm32loader";
homepage = "https://github.com/florisla/stm32loader";
changelog = "https://github.com/florisla/stm32loader/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3;
maintainers = with maintainers; [ ];
};
}