Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.1 kB view raw
1{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy27 2, decorator 3, importlib-metadata 4, python 5, python_magic 6, six 7, urllib3 }: 8 9buildPythonPackage rec { 10 pname = "mocket"; 11 version = "3.8.8"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "0yqls2hqmfs6i4p2nb89j5icyrqwabalsmwfixfvbjir4fmgad2l"; 16 }; 17 18 patchPhase = '' 19 substituteInPlace requirements.txt \ 20 --replace "python-magic==0.4.18" "python-magic" \ 21 --replace "urllib3==1.25.10" "urllib3" 22 substituteInPlace setup.py --replace 'setup_requires=["pipenv"]' "setup_requires=[]" 23 ''; 24 25 propagatedBuildInputs = [ 26 decorator 27 python_magic 28 urllib3 29 six 30 ] ++ lib.optionals (isPy27) [ six ]; 31 32 # Pypi has no runtests.py, github has no requirements.txt. No way to test, no way to install. 33 doCheck = false; 34 35 pythonImportsCheck = [ "mocket" ]; 36 37 meta = with lib; { 38 description = "A socket mock framework - for all kinds of socket animals, web-clients included"; 39 homepage = "https://github.com/mindflayer/python-mocket"; 40 license = licenses.bsd3; 41 maintainers = with maintainers; [ hexa ]; 42 }; 43}