Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildPythonPackage, fetchFromGitHub, requests, pytest, coveralls }: 2 3buildPythonPackage rec { 4 pname = "googletrans"; 5 version = "2.4.0"; 6 7 src = fetchFromGitHub { 8 owner = "ssut"; 9 repo = "py-googletrans"; 10 rev = "v${version}"; 11 sha256 = "0wzzinn0k9rfv9z1gmfk9l4kljyd4n6kizsjw4wjxv91kfhj92hz"; 12 }; 13 14 propagatedBuildInputs = [ 15 requests 16 ]; 17 18 checkInputs = [ pytest coveralls ]; 19 20 # majority of tests just try to ping Google's Translate API endpoint 21 doCheck = false; 22 checkPhase = '' 23 pytest 24 ''; 25 26 pythonImportsCheck = [ "googletrans" ]; 27 28 meta = with lib; { 29 description = "Googletrans is python library to interact with Google Translate API"; 30 homepage = "https://py-googletrans.readthedocs.io"; 31 license = licenses.mit; 32 maintainers = with maintainers; [ unode ]; 33 }; 34}