mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, clang
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, installShellFiles
|
|
, openssl
|
|
, libpcap
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "cowpatty";
|
|
version = "4.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "joswr1ght";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "0fvwwghhd7wsx0lw2dj9rdsjnirawnq3c6silzvhi0yfnzn5fs0s";
|
|
};
|
|
|
|
patches = [
|
|
# Pull upstream fix for parallel builds:
|
|
# https://github.com/joswr1ght/cowpatty/pull/5
|
|
(fetchpatch {
|
|
name = "fix-parallel.patch";
|
|
url = "https://github.com/joswr1ght/cowpatty/commit/9c8cc09c4fa90aebee44afcd0ad6a35539178478.patch";
|
|
hash = "sha256-k0Qht80HcjvPoxVPF6wAXwxN3d2mxBrEyeFGuU7w9eA=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
clang
|
|
installShellFiles
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
libpcap
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
makeFlags = [
|
|
"DESTDIR=$(out)"
|
|
"BINDIR=/bin"
|
|
];
|
|
|
|
postInstall = ''
|
|
installManPage cowpatty.1
|
|
installManPage genpmk.1
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Offline dictionary attack against WPA/WPA2 networks";
|
|
homepage = "https://github.com/joswr1ght/cowpatty";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ nico202 fab ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|