nixpkgs/pkgs/by-name/md/mdk4/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

35 lines
876 B
Nix

{ lib, stdenv, fetchFromGitHub, libnl, libpcap, pkg-config }:
stdenv.mkDerivation {
pname = "mdk4";
version = "unstable-2021-04-27";
src = fetchFromGitHub {
owner = "aircrack-ng";
repo = "mdk4";
rev = "e94422ce8e4b8dcd132d658345814df7e63bfa41";
sha256 = "sha256-pZS7HQBKlSZJGqoZlSyBUzXC3osswcB56cBzgm+Sbwg=";
};
preBuild = ''
mkdir -p $out/bin
mkdir -p $out/share/man
substituteInPlace src/Makefile --replace '/usr/local/src/mdk4' '$out'
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libnl libpcap ];
makeFlags = [ "PREFIX=$(out)" "SBINDIR=$(PREFIX)/bin" ];
meta = with lib; {
description = "Tool that injects data into wireless networks";
homepage = "https://github.com/aircrack-ng/mdk4";
maintainers = with maintainers; [ moni ];
license = licenses.gpl2Plus;
mainProgram = "mdk4";
};
}