1{ lib
2, buildPythonPackage
3, nettools
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "pytap2";
11 version = "2.3.0";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "johnthagen";
18 repo = "pytap2";
19 rev = "v${version}";
20 hash = "sha256-GN8yFnS7HVgIP73/nVtYnwwhCBI9doGHLGSOaFiWIdw=";
21 };
22
23 propagatedBuildInputs = [
24 nettools
25 ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 ];
30
31 pythonImportsCheck = [
32 "pytap2"
33 ];
34
35 meta = with lib; {
36 description = "Object-oriented wrapper around the Linux Tun/Tap device";
37 homepage = "https://github.com/johnthagen/pytap2";
38 license = with licenses; [ mit ];
39 maintainers = with maintainers; [ fab ];
40 platforms = platforms.linux;
41 };
42}