nixpkgs/pkgs/development/python-modules/myuplink/default.nix
2024-04-04 09:50:40 +02:00

43 lines
898 B
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "myuplink";
version = "0.6.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "pajzo";
repo = "myuplink";
rev = "refs/tags/${version}";
hash = "sha256-QIFTM4RQR3C67q+sBUCPhUyXylzplNAppHjzvU7i2YU=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "%%VERSION_NO%%" "${version}"
'';
build-system = [ setuptools ];
dependencies = [ aiohttp ];
pythonImportsCheck = [ "myuplink" ];
meta = with lib; {
description = "Module to interact with the myUplink API";
homepage = "https://github.com/pajzo/myuplink";
changelog = "https://github.com/pajzo/myuplink/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}