1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, poetry-core 5, pytest 6, pythonOlder 7, setuptoolsBuildHook 8}: 9 10buildPythonPackage rec { 11 pname = "pytest-socket"; 12 version = "0.5.1"; 13 format = "pyproject"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "miketheman"; 19 repo = pname; 20 rev = version; 21 hash = "sha256-QKHnuq2pqWMVUhF9nnhJggEK6SSyp6zBEfQX9tGND2E="; 22 }; 23 24 nativeBuildInputs = [ 25 poetry-core 26 ]; 27 28 buildInputs = [ 29 pytest 30 ]; 31 32 # pytest-socket require network for majority of tests 33 doCheck = false; 34 35 pythonImportsCheck = [ 36 "pytest_socket" 37 ]; 38 39 meta = with lib; { 40 description = "Pytest Plugin to disable socket calls during tests"; 41 homepage = "https://github.com/miketheman/pytest-socket"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ costrouc ]; 44 }; 45}