nixpkgs/pkgs/tools/networking/wifish/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.3 KiB
Nix
Raw Normal View History

2021-01-15 09:19:50 +00:00
{ lib, stdenv, fetchFromGitHub
2021-01-03 01:47:40 +00:00
, dialog
, gawk
, wpa_supplicant
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "wifish";
version = "1.1.4";
src = fetchFromGitHub{
owner = "bougyman";
repo = "wifish";
rev = version;
sha256 = "sha256-eTErN6CfKDey/wV+9o9cBVaG5FzCRBiA9UicrMz3KBc=";
};
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
sed -ie 's|/var/lib/wifish|${placeholder "out"}/var/lib/wifish|' wifish
'';
dontConfigure = true;
installPhase = ''
install -D -m0644 awk/wscanparse.awk ${placeholder "out"}/var/lib/wifish/wscanparse.awk
install -D -m0644 awk/wlistparse.awk ${placeholder "out"}/var/lib/wifish/wlistparse.awk
install -D -m0644 awk/wscan2menu.awk ${placeholder "out"}/var/lib/wifish/wscan2menu.awk
install -D -m0644 awk/iwparse.awk ${placeholder "out"}/var/lib/wifish/iwparse.awk
install -D -m0755 wifish ${placeholder "out"}/bin/wifish
'';
postFixup = ''
wrapProgram ${placeholder "out"}/bin/wifish \
2021-01-15 09:19:50 +00:00
--prefix PATH ":" ${lib.makeBinPath [ dialog gawk wpa_supplicant ]}
2021-01-03 01:47:40 +00:00
'';
2021-01-15 09:19:50 +00:00
meta = with lib; {
2021-01-03 01:47:40 +00:00
homepage = "https://github.com/bougyman/wifish";
description = "Simple wifi shell script for linux";
license = licenses.wtfpl;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; linux;
};
}