2021-02-22 21:28:39 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-01-20 10:41:00 +00:00
|
|
|
, py
|
2021-02-22 21:28:39 +00:00
|
|
|
, pytest-benchmark
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
2023-02-02 18:25:31 +00:00
|
|
|
, pythonOlder
|
2021-02-22 21:28:39 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "getmac";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "0.9.2";
|
2022-01-07 04:07:37 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GhostofGoes";
|
2021-02-22 21:28:39 +00:00
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-n4WpEbkaYUS0aGdZKO5T/cuDr5OxauiuOAAdK56/+AM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
py
|
2021-02-22 21:28:39 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-benchmark
|
|
|
|
pytest-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Disable CLI tests
|
|
|
|
"test_cli_main_basic"
|
|
|
|
"test_cli_main_verbose"
|
|
|
|
"test_cli_main_debug"
|
|
|
|
"test_cli_multiple_debug_levels"
|
|
|
|
# Disable test that require network access
|
|
|
|
"test_uuid_lanscan_iface"
|
|
|
|
];
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"getmac"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-02-22 21:28:39 +00:00
|
|
|
description = "Python package to get the MAC address of network interfaces and hosts on the local network";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/GhostofGoes/getmac";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/GhostofGoes/getmac/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ colemickens ];
|
|
|
|
};
|
|
|
|
}
|