nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, requests
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "pynuki";
11 version = "1.5.2";
12 format = "pyproject";
13
14 disabled = pythonOlder "3.8";
15
16 src = fetchFromGitHub {
17 owner = "pschmitt";
18 repo = pname;
19 rev = version;
20 sha256 = "sha256-Uqw1Xa0pBQmQsFEBv/l1gtsPy+owYcTZITOYUmMvT5Y=";
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml \
25 --replace 'requests = ">=2.27,<3"' 'requests = "*"'
26 '';
27
28 nativeBuildInputs = [ poetry-core ];
29
30 propagatedBuildInputs = [
31 requests
32 ];
33
34 # Project has no tests
35 doCheck = false;
36
37 pythonImportsCheck = [
38 "pynuki"
39 ];
40
41 meta = with lib; {
42 description = "Python bindings for nuki.io bridges";
43 homepage = "https://github.com/pschmitt/pynuki";
44 license = with licenses; [ gpl3Only ];
45 maintainers = with maintainers; [ fab ];
46 };
47}