diff options
author | Jonas Heinrich <onny@project-insanity.org> | 2021-09-07 11:01:11 +0200 |
---|---|---|
committer | Yt <raphael@megzari.com> | 2022-04-13 07:34:56 -0400 |
commit | ecaee94bc095e30b39fb9ea6334fbd33a4d42845 (patch) | |
tree | 7ea46a71cea2f3fbefc19009fc371bb48038509b /pkgs/os-specific/linux/linux-wifi-hotspot | |
parent | 1730f14d79a80800c38125f5d61a55f531f10af2 (diff) | |
download | nixpkgs-ecaee94bc095e30b39fb9ea6334fbd33a4d42845.tar nixpkgs-ecaee94bc095e30b39fb9ea6334fbd33a4d42845.tar.gz nixpkgs-ecaee94bc095e30b39fb9ea6334fbd33a4d42845.tar.bz2 nixpkgs-ecaee94bc095e30b39fb9ea6334fbd33a4d42845.tar.lz nixpkgs-ecaee94bc095e30b39fb9ea6334fbd33a4d42845.tar.xz nixpkgs-ecaee94bc095e30b39fb9ea6334fbd33a4d42845.tar.zst nixpkgs-ecaee94bc095e30b39fb9ea6334fbd33a4d42845.zip |
linux-wifi-hotspot: init at 4.4.0
Diffstat (limited to 'pkgs/os-specific/linux/linux-wifi-hotspot')
-rw-r--r-- | pkgs/os-specific/linux/linux-wifi-hotspot/default.nix | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/linux-wifi-hotspot/default.nix b/pkgs/os-specific/linux/linux-wifi-hotspot/default.nix new file mode 100644 index 00000000000..2cefc9b0216 --- /dev/null +++ b/pkgs/os-specific/linux/linux-wifi-hotspot/default.nix @@ -0,0 +1,74 @@ +{ lib +, stdenv +, fetchFromGitHub +, which +, pkg-config +, glib +, gtk3 +, iw +, makeWrapper +, qrencode +, hostapd }: + +stdenv.mkDerivation rec { + pname = "linux-wifi-hotspot"; + version = "4.4.0"; + + src = fetchFromGitHub { + owner = "lakinduakash"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-XCgYWOX7QSdANG6DqYk0yZZqnvZGDl3GaF9KtYRmpJ0="; + }; + + 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" + substituteInPlace ./src/scripts/create_ap.service \ + --replace "/usr/bin/create_ap" "$out/bin/create_cap" \ + --replace "/etc/create_ap.conf" "$out/etc/create_cap.conf" + ''; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + ]; + + postInstall = '' + wrapProgram $out/bin/create_ap \ + --prefix PATH : ${lib.makeBinPath [ hostapd ]} + + 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; + }; + +} |