nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest,
7}:
8
9buildPythonPackage rec {
10 pname = "pytest-socket";
11 version = "0.7.0";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "miketheman";
16 repo = "pytest-socket";
17 tag = version;
18 hash = "sha256-19YF3q85maCVdVg2HOOPbN45RNjBf6kiFAhLut8B2tQ=";
19 };
20
21 nativeBuildInputs = [ poetry-core ];
22
23 buildInputs = [ pytest ];
24
25 # pytest-socket require network for majority of tests
26 doCheck = false;
27
28 pythonImportsCheck = [ "pytest_socket" ];
29
30 meta = {
31 description = "Pytest Plugin to disable socket calls during tests";
32 homepage = "https://github.com/miketheman/pytest-socket";
33 changelog = "https://github.com/miketheman/pytest-socket/blob/${version}/CHANGELOG.md";
34 license = lib.licenses.mit;
35 maintainers = [ ];
36 };
37}