Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pbkdf2, 6 pytestCheckHook, 7 pythonOlder, 8 substituteAll, 9 wirelesstools, 10}: 11 12buildPythonPackage rec { 13 pname = "wifi"; 14 version = "0.3.5"; 15 format = "setuptools"; 16 17 src = fetchFromGitHub { 18 owner = "rockymeza"; 19 repo = pname; 20 rev = "v${version}"; 21 hash = "sha256-scg/DvApvyQZtzDgkHFJzf9gCRfJgBvZ64CG/c2Cx8E="; 22 }; 23 24 disabled = pythonOlder "2.6"; 25 26 postPatch = '' 27 substituteInPlace wifi/scan.py \ 28 --replace "/sbin/iwlist" "${wirelesstools}/bin/iwlist" 29 ''; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 propagatedBuildInputs = [ pbkdf2 ]; 34 35 pythonImportsCheck = [ "wifi" ]; 36 37 meta = with lib; { 38 description = "Provides a command line wrapper for iwlist and /etc/network/interfaces"; 39 mainProgram = "wifi"; 40 homepage = "https://github.com/rockymeza/wifi"; 41 maintainers = with maintainers; [ rhoriguchi ]; 42 license = licenses.bsd2; 43 }; 44}