2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pbkdf2,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
wirelesstools,
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wifi";
|
|
|
|
version = "0.3.5";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rockymeza";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-scg/DvApvyQZtzDgkHFJzf9gCRfJgBvZ64CG/c2Cx8E=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = pythonOlder "2.6";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace wifi/scan.py \
|
|
|
|
--replace "/sbin/iwlist" "${wirelesstools}/bin/iwlist"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ pbkdf2 ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "wifi" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Provides a command line wrapper for iwlist and /etc/network/interfaces";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "wifi";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/rockymeza/wifi";
|
|
|
|
maintainers = with maintainers; [ rhoriguchi ];
|
|
|
|
license = licenses.bsd2;
|
|
|
|
};
|
|
|
|
}
|