linux-wifi-hotspot: format with nixfmt-rfc-style

move to finalAttrs
This commit is contained in:
John Titor 2024-08-01 00:20:02 +05:30
parent b8469764b0
commit 0c019c4ca6
No known key found for this signature in database
GPG Key ID: 29B0514F4E3C1CC0

View File

@ -1,37 +1,37 @@
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, which fetchFromGitHub,
, pkg-config which,
, glib pkg-config,
, gtk3 glib,
, iw gtk3,
, makeWrapper iw,
, qrencode makeWrapper,
, hostapd qrencode,
, getopt hostapd,
, dnsmasq getopt,
, iproute2 dnsmasq,
, flock iproute2,
, iptables flock,
, gawk iptables,
, coreutils gawk,
, gnugrep coreutils,
, gnused gnugrep,
, kmod gnused,
, networkmanager kmod,
, procps networkmanager,
procps,
}: }:
stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation rec {
pname = "linux-wifi-hotspot"; pname = "linux-wifi-hotspot";
version = "4.7.2"; version = "4.7.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "lakinduakash"; owner = "lakinduakash";
repo = pname; repo = "linux-wifi-hotspot";
rev = "v${version}"; rev = "v${finalAttrs.version}";
sha256 = "sha256-+WHYWQ4EyAt+Kq0LHEgC7Kk5HpIqThz6W3PIdW8Wojk="; sha256 = "sha256-+WHYWQ4EyAt+Kq0LHEgC7Kk5HpIqThz6W3PIdW8Wojk=";
}; };
@ -61,13 +61,12 @@ stdenv.mkDerivation rec {
--replace "/usr" "$out" --replace "/usr" "$out"
''; '';
makeFlags = [ makeFlags = [ "PREFIX=${placeholder "out"}" ];
"PREFIX=${placeholder "out"}"
];
postInstall = '' postInstall = ''
wrapProgram $out/bin/create_ap \ wrapProgram $out/bin/create_ap \
--prefix PATH : ${lib.makeBinPath [ --prefix PATH : ${
lib.makeBinPath [
coreutils coreutils
dnsmasq dnsmasq
flock flock
@ -83,7 +82,8 @@ stdenv.mkDerivation rec {
networkmanager networkmanager
procps procps
which which
]} ]
}
wrapProgram $out/bin/wihotspot-gui \ wrapProgram $out/bin/wihotspot-gui \
--prefix PATH : ${lib.makeBinPath [ iw ]} \ --prefix PATH : ${lib.makeBinPath [ iw ]} \
@ -102,4 +102,4 @@ stdenv.mkDerivation rec {
platforms = platforms.unix; platforms = platforms.unix;
}; };
} })