1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 py,
6 pytest-benchmark,
7 pytest-mock,
8 pytestCheckHook,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "getmac";
14 version = "0.9.4";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "GhostofGoes";
21 repo = pname;
22 rev = "refs/tags/${version}";
23 hash = "sha256-B9agBmSrD3ZhqpGclZdMQNRSLSkepR6iduP1yrYz9tU=";
24 };
25
26 nativeCheckInputs = [
27 py
28 pytestCheckHook
29 pytest-benchmark
30 pytest-mock
31 ];
32
33 disabledTests = [
34 # Disable CLI tests
35 "test_cli_main_basic"
36 "test_cli_main_verbose"
37 "test_cli_main_debug"
38 "test_cli_multiple_debug_levels"
39 # Disable test that require network access
40 "test_uuid_lanscan_iface"
41 # Mocking issue
42 "test_initialize_method_cache_valid_types"
43 ];
44
45 pythonImportsCheck = [ "getmac" ];
46
47 meta = with lib; {
48 description = "Python package to get the MAC address of network interfaces and hosts on the local network";
49 mainProgram = "getmac";
50 homepage = "https://github.com/GhostofGoes/getmac";
51 changelog = "https://github.com/GhostofGoes/getmac/blob/${version}/CHANGELOG.md";
52 license = licenses.mit;
53 maintainers = with maintainers; [ colemickens ];
54 };
55}