Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Heizung
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
c3pb
Heizung
Commits
629f1aca
Commit
629f1aca
authored
1 year ago
by
Benjamin Koch
Browse files
Options
Downloads
Patches
Plain Diff
add modbus-tk and newer version of pymodbus to our Nix shell
parent
fc56556e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
flake.nix
+4
-0
4 additions, 0 deletions
flake.nix
nix/modbus-tk.nix
+24
-0
24 additions, 0 deletions
nix/modbus-tk.nix
nix/pymodbus3.nix
+73
-0
73 additions, 0 deletions
nix/pymodbus3.nix
with
101 additions
and
0 deletions
flake.nix
+
4
−
0
View file @
629f1aca
...
...
@@ -13,6 +13,9 @@
qrcodegen
=
python-final
.
callPackage
nix/qrcodegen.nix
{
};
svgutils
=
python-final
.
callPackage
nix/svgutils.nix
{
};
pcbnewTransition
=
python-final
.
callPackage
nix/pcbnewTransition.nix
{
};
modbus-tk
=
python-final
.
callPackage
nix/modbus-tk.nix
{
};
pymodbus3
=
python-final
.
callPackage
nix/pymodbus3.nix
{
};
})
];
other
.
python3Packages
=
self
.
packages
.
${
system
}
.
python3
.
pkgs
;
...
...
@@ -153,6 +156,7 @@
devShells
.
rust
=
with
self
.
packages
.
${
system
};
pkgs
.
mkShell
{
packages
=
with
pkgs
;
[
rustup
udev
.
dev
pkg-config
openssl
.
dev
picotool
(
self
.
packages
.
${
system
}
.
python3
.
withPackages
(
p
:
with
p
;
[
pymodbus3
pyserial
modbus-tk
]))
];
};
}
...
...
This diff is collapsed.
Click to expand it.
nix/modbus-tk.nix
0 → 100644
+
24
−
0
View file @
629f1aca
{
lib
,
buildPythonPackage
,
fetchFromGitHub
,
pyserial
}:
buildPythonPackage
rec
{
pname
=
"modbus-tk"
;
version
=
"git"
;
src
=
fetchFromGitHub
{
owner
=
"ljean"
;
repo
=
pname
;
rev
=
"f32bb42cda8be3122fefad59a35b5c5fe6bcf567"
;
hash
=
"sha256-wKFRi6xcStuQURJ3Lo48P0lFDfg33Zt3NLJzqvu138U="
;
};
# Twisted asynchronous version is not supported due to a missing dependency
propagatedBuildInputs
=
[
pyserial
];
pythonImportsCheck
=
[
"modbus_tk"
];
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
nix/pymodbus3.nix
0 → 100644
+
73
−
0
View file @
629f1aca
# based on https://github.com/NixOS/nixpkgs/blob/c8a17ce7abc03c50cd072e9e6c9b389c5f61836b/pkgs/development/python-modules/pymodbus/default.nix
{
lib
,
aiohttp
,
asynctest
,
buildPythonPackage
,
click
,
fetchFromGitHub
,
mock
,
prompt-toolkit
,
pygments
,
pyserial
,
pyserial-asyncio
,
pytestCheckHook
,
redis
,
sqlalchemy
,
tornado
,
twisted
,
pytest-asyncio
,
pytest-xdist
}:
buildPythonPackage
rec
{
pname
=
"pymodbus"
;
version
=
"3.2.2"
;
src
=
fetchFromGitHub
{
owner
=
"pymodbus-dev"
;
repo
=
pname
;
rev
=
"v
${
version
}
"
;
hash
=
"sha256-Hw7oGYzjcHBTBjE9vf+3D8DzXdqVuHbJmIMH0W3mwE4="
;
};
# Twisted asynchronous version is not supported due to a missing dependency
propagatedBuildInputs
=
[
aiohttp
click
prompt-toolkit
pygments
pyserial
pyserial-asyncio
tornado
];
checkInputs
=
[
asynctest
mock
pytestCheckHook
redis
sqlalchemy
twisted
pytest-asyncio
pytest-xdist
];
pythonImportsCheck
=
[
"pymodbus"
];
# many tests fail because self.loop is None in TestAsyncioServer
#FIXME We should figure this out but that's not a priority here because we don't use async, yet.
doCheck
=
false
;
meta
=
with
lib
;
{
description
=
"Python implementation of the Modbus protocol"
;
longDescription
=
''
Pymodbus is a full Modbus protocol implementation using twisted,
torndo or asyncio for its asynchronous communications core. It can
also be used without any third party dependencies if a more
lightweight project is needed.
''
;
homepage
=
"https://github.com/riptideio/pymodbus"
;
license
=
with
licenses
;
[
bsd3
];
maintainers
=
with
maintainers
;
[
fab
];
};
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment