nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, parameterized
5, pycryptodome
6, pytestCheckHook
7, pythonOlder
8, pyyaml
9, requests
10, responses
11, setuptools
12}:
13
14buildPythonPackage rec {
15 pname = "pyrainbird";
16 version = "0.4.3";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "jbarrancos";
23 repo = pname;
24 rev = version;
25 hash = "sha256-uRHknWvoPKPu3B5MbSEUlWqBKwAbNMwsgXuf6PZxhkU=";
26 };
27
28 propagatedBuildInputs = [
29 pycryptodome
30 pyyaml
31 requests
32 setuptools
33 ];
34
35 checkInputs = [
36 pytestCheckHook
37 parameterized
38 responses
39 ];
40
41 postPatch = ''
42 substituteInPlace requirements.txt \
43 --replace "datetime" ""
44 substituteInPlace pytest.ini \
45 --replace "--cov=pyrainbird --cov-report=term-missing --pep8 --flakes --mccabe" ""
46 '';
47
48 pythonImportsCheck = [
49 "pyrainbird"
50 ];
51
52 meta = with lib; {
53 description = "Module to interact with Rainbird controllers";
54 homepage = "https://github.com/jbarrancos/pyrainbird/";
55 license = with licenses; [ mit ];
56 maintainers = with maintainers; [ fab ];
57 };
58}