depot/third_party/nixpkgs/pkgs/development/python-modules/myuplink/default.nix

48 lines
922 B
Nix
Raw Normal View History

{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "myuplink";
version = "0.5.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "pajzo";
repo = "myuplink";
rev = "refs/tags/${version}";
hash = "sha256-UJGRQqgtbYBwfjys2sYiC3dx8Doesu34EBys5Y++qBY=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "%%VERSION_NO%%" "${version}"
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
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 ];
};
}