nixpkgs/pkgs/development/python-modules/bsblan/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.2 KiB
Nix
Raw Normal View History

2021-01-22 08:41:59 +00:00
{ lib
, aiohttp
, aresponses
2021-01-22 08:41:59 +00:00
, buildPythonPackage
, fetchFromGitHub
, mypy
, packaging
2022-03-09 23:27:02 +00:00
, poetry-core
, pydantic
2021-01-22 08:41:59 +00:00
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, pythonOlder
, setuptools
2021-01-22 08:41:59 +00:00
, yarl
}:
buildPythonPackage rec {
pname = "bsblan";
2022-03-02 21:41:54 +00:00
version = "0.5.5";
2022-03-09 23:27:02 +00:00
format = "pyproject";
disabled = pythonOlder "3.9";
2021-01-22 08:41:59 +00:00
src = fetchFromGitHub {
owner = "liudger";
repo = "python-bsblan";
2022-03-02 21:41:54 +00:00
rev = "v${version}";
hash = "sha256-kq4cML7D9XC/QRPjGfaWcs0H78OOc2IXGua7qJpWYOQ=";
2021-01-22 08:41:59 +00:00
};
2022-03-09 23:27:02 +00:00
nativeBuildInputs = [
poetry-core
setuptools
2022-03-09 23:27:02 +00:00
];
2021-01-22 08:41:59 +00:00
propagatedBuildInputs = [
aiohttp
packaging
2022-03-09 23:27:02 +00:00
pydantic
2021-01-22 08:41:59 +00:00
yarl
];
checkInputs = [
aresponses
mypy
pytest-asyncio
pytest-mock
pytestCheckHook
];
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace 'version = "0.0.0"' 'version = "${version}"' \
--replace "--cov" ""
'';
pythonImportsCheck = [
"bsblan"
];
2021-01-22 08:41:59 +00:00
meta = with lib; {
description = "Python client for BSB-Lan";
homepage = "https://github.com/liudger/python-bsblan";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}