aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix
blob: 58eb5f7028ac1a1254dffd98165e7451bc9f8e2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib, buildPythonPackage, isPy3k, fetchFromGitHub, requests
, requests-mock, pytest
}:

buildPythonPackage rec {
  pname = "pyairvisual";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "bachya";
    repo = pname;
    rev = "v${version}";
    sha256 = "0ng6k07n91k5l68zk3hl4fywb33admp84wqdm20qmmw9yc9c64fd";
  };

  checkInputs = [ pytest requests-mock ];
  propagatedBuildInputs = [ requests ];

  checkPhase = ''
    py.test tests
  '';

  disabled = !isPy3k;

  meta = with lib; {
    description = "A thin Python wrapper for the AirVisual API";
    license = licenses.mit;
    homepage = "https://github.com/bachya/pyairvisual";
  };
}