
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
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 -i -e '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 \
|
|
--prefix PATH ":" ${
|
|
lib.makeBinPath [
|
|
dialog
|
|
gawk
|
|
wpa_supplicant
|
|
]
|
|
}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/bougyman/wifish";
|
|
description = "Simple wifi shell script for linux";
|
|
mainProgram = "wifish";
|
|
license = licenses.wtfpl;
|
|
maintainers = with maintainers; [ ];
|
|
platforms = with platforms; linux;
|
|
};
|
|
}
|