2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, which
|
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, iw
|
|
|
|
, makeWrapper
|
|
|
|
, qrencode
|
2022-04-27 09:35:20 +00:00
|
|
|
, hostapd
|
|
|
|
, getopt
|
|
|
|
, dnsmasq
|
|
|
|
, iproute2
|
|
|
|
, flock
|
|
|
|
, iptables
|
2022-08-12 12:06:08 +00:00
|
|
|
, gawk
|
|
|
|
, coreutils
|
|
|
|
, gnugrep
|
|
|
|
, gnused
|
|
|
|
, kmod
|
|
|
|
, networkmanager
|
|
|
|
, procps
|
|
|
|
}:
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "linux-wifi-hotspot";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "4.6.0";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lakinduakash";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-u9OdSpdxnjHOrK6PP/SFvGRtezssoZSoJFGVdRbOIPU=";
|
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
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/create_ap \
|
2022-04-27 09:35:20 +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
|
2022-04-27 09:35:20 +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;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|