python312Packages.llama-index: 0.12.9 -> 0.12.9.post1 (#371957)
[NixPkgs.git] / pkgs / by-name / li / linux-wifi-hotspot / package.nix
blob75ab89eef600d7ecf0d154162e5fcaa51f5357ae
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   which,
6   pkg-config,
7   glib,
8   gtk3,
9   iw,
10   makeWrapper,
11   qrencode,
12   hostapd,
13   getopt,
14   dnsmasq,
15   iproute2,
16   flock,
17   iptables,
18   gawk,
19   coreutils,
20   gnugrep,
21   gnused,
22   kmod,
23   networkmanager,
24   procps,
27 stdenv.mkDerivation (finalAttrs: {
28   pname = "linux-wifi-hotspot";
29   version = "4.7.2";
31   src = fetchFromGitHub {
32     owner = "lakinduakash";
33     repo = "linux-wifi-hotspot";
34     rev = "v${finalAttrs.version}";
35     hash = "sha256-+WHYWQ4EyAt+Kq0LHEgC7Kk5HpIqThz6W3PIdW8Wojk=";
36   };
38   nativeBuildInputs = [
39     which
40     pkg-config
41     makeWrapper
42     qrencode
43     hostapd
44   ];
46   buildInputs = [
47     glib
48     gtk3
49   ];
51   outputs = [ "out" ];
53   postPatch = ''
54     substituteInPlace ./src/scripts/Makefile \
55       --replace "etc" "$out/etc"
56     substituteInPlace ./src/scripts/wihotspot \
57       --replace "/usr" "$out"
58     substituteInPlace ./src/desktop/wifihotspot.desktop \
59       --replace "/usr" "$out"
60     substituteInPlace ./src/scripts/policies/polkit.policy \
61       --replace "/usr" "$out"
62   '';
64   makeFlags = [ "PREFIX=${placeholder "out"}" ];
66   postInstall = ''
67     wrapProgram $out/bin/create_ap \
68       --prefix PATH : ${
69         lib.makeBinPath [
70           coreutils
71           dnsmasq
72           flock
73           gawk
74           getopt
75           gnugrep
76           gnused
77           hostapd
78           iproute2
79           iptables
80           iw
81           kmod
82           networkmanager
83           procps
84           which
85         ]
86       }
88     wrapProgram $out/bin/wihotspot-gui \
89       --prefix PATH : ${lib.makeBinPath [ iw ]} \
90       --prefix PATH : "${placeholder "out"}/bin"
92     wrapProgram $out/bin/wihotspot \
93       --prefix PATH : ${lib.makeBinPath [ iw ]} \
94       --prefix PATH : "${placeholder "out"}/bin"
95   '';
97   meta = with lib; {
98     description = "Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface";
99     homepage = "https://github.com/lakinduakash/linux-wifi-hotspot";
100     license = licenses.bsd2;
101     maintainers = with maintainers; [
102       johnrtitor
103       onny
104     ];
105     platforms = platforms.unix;
106   };