1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ stdenv, lib, util-linux, python3, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "rofi-iwd-wifi-menu";
version = "0.0.0";
src = fetchFromGitHub {
owner = "defname";
repo = "rofi-iwd-wifi-menu";
rev = "02c6c319bc5997480e19d05818dd6eba5732dee3";
sha256 = "sha256-tNOsQSaTg/Wja3ap6b611esnTC07w6X0ifIVnJL5Ojs=";
};
buildInputs = [
(python3.withPackages (pythonPackages: with pythonPackages; [
pexpect
]))
];
buildPhase = "true";
installPhase = ''
mkdir -p $out/bin $out/rofi-iwd-wifi-menu
cp -r $src/iwdrofimenu $out/rofi-iwd-wifi-menu/
cp -r $src/res $out/rofi-iwd-wifi-menu/
cp $src/iwdrofimenu.py $out/rofi-iwd-wifi-menu/
cp $src/settings.py $out/rofi-iwd-wifi-menu/
ln -s $out/rofi-iwd-wifi-menu/iwdrofimenu.py $out/bin/iwdrofimenu
substituteInPlace $out/rofi-iwd-wifi-menu/settings.py --replace '"rfkill_cmd": "rfkill",' '"rfkill_cmd": "${util-linux}/bin/rfkill",'
'';
meta = with lib; {
homepage = "https://github.com/defname/rofi-iwd-wifi-menu";
description = "Minimalistic WiFi network chooser for iwd using rofi.";
license = licenses.gpl3Only;
};
}