a19cd4ffb1
This reverts commit65a333600d. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 /758551e458
54 lines
1.0 KiB
Nix
54 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
construct,
|
|
paho-mqtt,
|
|
pyserial-asyncio,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "amshan";
|
|
version = "2.1.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "toreamun";
|
|
repo = "amshan";
|
|
rev = version;
|
|
hash = "sha256-aw0wTqb2s84STVUN55h6L926pXwaMSppBCfXZVb87w0=";
|
|
};
|
|
|
|
build-system = [
|
|
setuptools
|
|
];
|
|
|
|
dependencies = [
|
|
construct
|
|
paho-mqtt
|
|
pyserial-asyncio
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "han" ];
|
|
|
|
# 2021.12.1 is an older version
|
|
passthru.skipBulkUpdate = true;
|
|
|
|
meta = {
|
|
description = "Decode smart power meter data stream of Cosem HDLC frames used by MBUS";
|
|
longDescription = ''
|
|
The package has special support of formats for Aidon, Kaifa and Kamstrup
|
|
meters used in Norway and Sweden (AMS HAN).
|
|
'';
|
|
homepage = "https://github.com/toreamun/amshan";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ bjornfor ];
|
|
};
|
|
}
|