mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 18:24:53 +00:00
50 lines
1.0 KiB
Nix
50 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitLab,
|
|
pyserial,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
six,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "aurorapy";
|
|
version = "0.3";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "energievalsabbia";
|
|
repo = "aurorapy";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-bc5i2x35sZXkCSJraTqX3Zc5B9eKL1qDh97/7ixyHLY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace-fail 'version="0.2.7"' 'version="${finalAttrs.version}"'
|
|
|
|
sed -i "/from past.builtins import map/d" aurorapy/client.py
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
pythonRemoveDeps = [ "future" ];
|
|
|
|
dependencies = [ pyserial ];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
six
|
|
];
|
|
|
|
pythonImportsCheck = [ "aurorapy" ];
|
|
|
|
meta = {
|
|
description = "Implementation of the communication protocol for Power-One Aurora inverters";
|
|
homepage = "https://gitlab.com/energievalsabbia/aurorapy";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
})
|