Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, buildPythonPackage, pythonOlder, fetchFromGitHub, pytest, requests }: 2 3buildPythonPackage rec { 4 pname = "fritzconnection"; 5 version = "1.2.1"; 6 7 src = fetchFromGitHub { 8 owner = "kbr"; 9 repo = pname; 10 rev = version; 11 sha256 = "17z4shs56ci9mxmilppv5xy9gbnbp6p1h2ms6x55nkvwndacrp7x"; 12 }; 13 14 disabled = pythonOlder "3.5"; 15 16 # Exclude test files from build, which cause ImportMismtachErrors and 17 # otherwise missing resources during tests. This patch can be dropped once 18 # https://github.com/kbr/fritzconnection/pull/39 is merged. 19 prePatch = '' 20 substituteInPlace setup.py \ 21 --replace 'find_packages()' 'find_packages(exclude=["*.tests"])' 22 ''; 23 24 propagatedBuildInputs = [ requests ]; 25 26 checkInputs = [ pytest ]; 27 28 checkPhase = '' 29 pytest 30 ''; 31 32 meta = with stdenv.lib; { 33 description = "Python-Tool to communicate with the AVM FritzBox using the TR-064 protocol"; 34 homepage = "https://bitbucket.org/kbr/fritzconnection"; 35 license = licenses.mit; 36 maintainers = with maintainers; [ dotlambda valodim ]; 37 }; 38}