1{ lib, buildPythonPackage, isPy3k, fetchFromGitHub, requests 2, requests-mock, pytest 3}: 4 5buildPythonPackage rec { 6 pname = "pyairvisual"; 7 version = "1.0.0"; 8 9 src = fetchFromGitHub { 10 owner = "bachya"; 11 repo = pname; 12 rev = "v${version}"; 13 sha256 = "0ng6k07n91k5l68zk3hl4fywb33admp84wqdm20qmmw9yc9c64fd"; 14 }; 15 16 checkInputs = [ pytest requests-mock ]; 17 propagatedBuildInputs = [ requests ]; 18 19 checkPhase = '' 20 py.test tests 21 ''; 22 23 disabled = !isPy3k; 24 25 meta = with lib; { 26 description = "A thin Python wrapper for the AirVisual API"; 27 license = licenses.mit; 28 homepage = https://github.com/bachya/pyairvisual; 29 }; 30}