2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
py,
|
|
|
|
pytest-benchmark,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-02-22 21:28:39 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "getmac";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.9.5";
|
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}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-ZbTCbbASs7+ChmgcDePXSbiHOst6/eCkq9SiKgYhFyM=";
|
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"
|
2023-03-27 19:17:25 +00:00
|
|
|
# Mocking issue
|
|
|
|
"test_initialize_method_cache_valid_types"
|
2021-02-22 21:28:39 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "getmac";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|