lol

python3Packages.pytest-socket: 0.3.3 -> 0.4.0

+23 -8
+23 -8
pkgs/development/python-modules/pytest-socket/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 3 , fetchFromGitHub 4 + , fetchpatch 5 + , poetry-core 4 6 , pytest 7 + , pythonOlder 5 8 }: 6 9 7 10 buildPythonPackage rec { 8 11 pname = "pytest-socket"; 9 - version = "0.3.3"; 12 + version = "0.4.0"; 13 + disabled = pythonOlder "3.6"; 14 + format = "pyproject"; 10 15 11 16 src = fetchFromGitHub { 12 17 owner = "miketheman"; 13 18 repo = pname; 14 19 rev = version; 15 - sha256 = "1jbzkyp4xki81h01yl4vg3nrg9b6shsk1ryrmkaslffyhrqnj8zh"; 20 + sha256 = "sha256-cFYtJqZ/RjFbn9XlEy6ffxZ2djisajQAwjV/YR2f59Q="; 16 21 }; 22 + 23 + nativeBuildInputs = [ 24 + poetry-core 25 + ]; 17 26 18 27 buildInputs = [ 19 28 pytest ··· 23 32 pytest 24 33 ]; 25 34 26 - checkPhase = '' 27 - pytest 28 - ''; 35 + patches = [ 36 + # Switch to poetry-core, https://github.com/miketheman/pytest-socket/pull/74 37 + (fetchpatch { 38 + name = "switch-to-poetry-core.patch"; 39 + url = "https://github.com/miketheman/pytest-socket/commit/32519170e656e731d24b81770a170333d3efa6a8.patch"; 40 + sha256 = "19ksgx77rsa6ijcbml74alwc5052mdqr4rmvqhlzvfcvv3676ig2"; 41 + }) 42 + ]; 29 43 30 - # unsurprisingly pytest-socket require network for majority of tests 31 - # to pass... 44 + # pytest-socket require network for majority of tests 32 45 doCheck = false; 46 + 47 + pythonImportsCheck = [ "pytest_socket" ]; 33 48 34 49 meta = with lib; { 35 50 description = "Pytest Plugin to disable socket calls during tests"; 36 51 homepage = "https://github.com/miketheman/pytest-socket"; 37 52 license = licenses.mit; 38 - maintainers = [ maintainers.costrouc ]; 53 + maintainers = with maintainers; [ costrouc ]; 39 54 }; 40 55 }