nixpkgs/pkgs/tools/networking/bully/default.nix
Jan Malakhovski 591ccfe5b9 treewide: noop: refer to src.name or similar where appropriate, part 3: more use cases
This continues where d8f7f6a5ce left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.

Also, similarly to d8f7f6a5ce some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
2023-08-11 09:20:44 +00:00

32 lines
769 B
Nix

{ lib, stdenv, fetchFromGitHub, libpcap }:
stdenv.mkDerivation rec {
pname = "bully";
version = "1.4-00";
src = fetchFromGitHub {
owner = "kimocoder";
repo = "bully";
rev = version;
sha256 = "1n2754a5z44g414a0hj3cmi9q5lwnzyvmvzskrj2nci8c8m2kgnf";
};
buildInputs = [ libpcap ];
enableParallelBuilding = true;
sourceRoot = "./${src.name}/src";
installPhase = ''
install -Dm555 -t $out/bin bully
install -Dm444 -t $out/share/doc/${pname} ../*.md
'';
meta = with lib; {
description = "Retrieve WPA/WPA2 passphrase from a WPS enabled access point";
homepage = "https://github.com/kimocoder/bully";
license = licenses.gpl3;
maintainers = with maintainers; [ edwtjo ];
platforms = platforms.linux;
};
}