2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
which,
|
|
|
|
pkg-config,
|
|
|
|
glib,
|
|
|
|
gtk3,
|
|
|
|
iw,
|
|
|
|
makeWrapper,
|
|
|
|
qrencode,
|
|
|
|
hostapd,
|
|
|
|
getopt,
|
|
|
|
dnsmasq,
|
|
|
|
iproute2,
|
|
|
|
flock,
|
|
|
|
iptables,
|
|
|
|
gawk,
|
|
|
|
coreutils,
|
|
|
|
gnugrep,
|
|
|
|
gnused,
|
|
|
|
kmod,
|
|
|
|
networkmanager,
|
|
|
|
procps,
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-04-15 01:41:22 +00:00
|
|
|
pname = "linux-wifi-hotspot";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "4.7.2";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lakinduakash";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "linux-wifi-hotspot";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-+WHYWQ4EyAt+Kq0LHEgC7Kk5HpIqThz6W3PIdW8Wojk=";
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
which
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
qrencode
|
|
|
|
hostapd
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ./src/scripts/Makefile \
|
|
|
|
--replace "etc" "$out/etc"
|
|
|
|
substituteInPlace ./src/scripts/wihotspot \
|
|
|
|
--replace "/usr" "$out"
|
2023-04-29 16:46:19 +00:00
|
|
|
substituteInPlace ./src/desktop/wifihotspot.desktop \
|
|
|
|
--replace "/usr" "$out"
|
|
|
|
substituteInPlace ./src/scripts/policies/polkit.policy \
|
|
|
|
--replace "/usr" "$out"
|
2022-04-15 01:41:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/create_ap \
|
2024-09-19 14:19:46 +00:00
|
|
|
--prefix PATH : ${
|
|
|
|
lib.makeBinPath [
|
2022-08-12 12:06:08 +00:00
|
|
|
coreutils
|
|
|
|
dnsmasq
|
|
|
|
flock
|
|
|
|
gawk
|
|
|
|
getopt
|
|
|
|
gnugrep
|
|
|
|
gnused
|
|
|
|
hostapd
|
|
|
|
iproute2
|
|
|
|
iptables
|
|
|
|
iw
|
|
|
|
kmod
|
|
|
|
networkmanager
|
|
|
|
procps
|
|
|
|
which
|
2024-09-19 14:19:46 +00:00
|
|
|
]
|
|
|
|
}
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/wihotspot-gui \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ iw ]} \
|
|
|
|
--prefix PATH : "${placeholder "out"}/bin"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/wihotspot \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ iw ]} \
|
|
|
|
--prefix PATH : "${placeholder "out"}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface";
|
|
|
|
homepage = "https://github.com/lakinduakash/linux-wifi-hotspot";
|
|
|
|
license = licenses.bsd2;
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
johnrtitor
|
|
|
|
onny
|
|
|
|
];
|
2022-04-15 01:41:22 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
})
|