Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions pkgs/by-name/sm/smpmgr/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ python3Packages.buildPythonApplication (finalAttrs: {
"smpclient"
];

dependencies = with python3Packages; [
readchar
smpclient
typer
];
dependencies =
with python3Packages;
[
readchar
smpclient
typer
]
++ smpclient.optional-dependencies.all;

nativeCheckInputs = with python3Packages; [
pytestCheckHook
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/python-modules/smp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ buildPythonPackage rec {
hash = "sha256-dATsVGG0b5SBZh7R7NT1deJFDRYi7BwtWzT7/QPjkJw=";
};

postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'version = "0"' 'version = "${version}"'
'';

build-system = [
poetry-core
];
Expand Down
29 changes: 16 additions & 13 deletions pkgs/development/python-modules/smpclient/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
bleak,
buildPythonPackage,
fetchFromGitHub,
hatch-vcs,
hatchling,
intelhex,
poetry-core,
poetry-dynamic-versioning,
pyserial,
pytest-asyncio,
pytestCheckHook,
Expand All @@ -15,38 +15,41 @@

buildPythonPackage rec {
pname = "smpclient";
version = "6.0.0";
version = "7.0.1";
pyproject = true;

src = fetchFromGitHub {
owner = "intercreate";
repo = "smpclient";
tag = version;
hash = "sha256-1FyrJivP+sOKXVFuH5NbvIlOTOkuiUO3uIRasH8D+d8=";
hash = "sha256-5o2z+cyOVpTNpOdc9GfFNmqcOhbGgbFM0qGng44E1xE=";
};

pythonRelaxDeps = [
"bleak"
"smp"
];
env.HATCH_BUILD_HOOK_VCS_VERSION = version;

build-system = [
poetry-core
poetry-dynamic-versioning
hatchling
hatch-vcs
];

dependencies = [
async-timeout
bleak
intelhex
pyserial
smp
];

optional-dependencies = {
serial = [ pyserial ];
ble = [ bleak ];
udp = [ ];
all = lib.concatAttrValues (lib.removeAttrs optional-dependencies [ "all" ]);
};
Comment thread
otavio marked this conversation as resolved.

nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
]
++ optional-dependencies.all;

pythonImportsCheck = [ "smpclient" ];

Expand Down
Loading