btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / development / python-modules / frigidaire / default.nix
blob4914314384b88b02d80c3a0373159fdf108392b2
2   lib,
3   buildPythonPackage,
4   certifi,
5   chardet,
6   fetchFromGitHub,
7   idna,
8   pythonOlder,
9   requests,
10   setuptools,
11   urllib3,
14 buildPythonPackage rec {
15   pname = "frigidaire";
16   version = "0.18.23";
17   pyproject = true;
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "bm1549";
23     repo = "frigidaire";
24     rev = "refs/tags/${version}";
25     hash = "sha256-RzwTQRo5cIh6I8VQAJNcLg5TBiF6dAnZICGfvwCvx5Y=";
26   };
28   postPatch = ''
29     substituteInPlace setup.py \
30       --replace-warn 'version = "SNAPSHOT"' 'version = "${version}"'
31   '';
33   nativeBuildInputs = [ setuptools ];
35   propagatedBuildInputs = [
36     certifi
37     chardet
38     idna
39     requests
40     urllib3
41   ];
43   # Project has no tests
44   doCheck = false;
46   pythonImportsCheck = [ "frigidaire" ];
48   meta = with lib; {
49     description = "Python API for the Frigidaire devices";
50     homepage = "https://github.com/bm1549/frigidaire";
51     changelog = "https://github.com/bm1549/frigidaire/releases/tag/${version}";
52     license = with licenses; [ mit ];
53     maintainers = with maintainers; [ fab ];
54   };