nixpkgs/pkgs/by-name/nc/ncrack/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

38 lines
1.0 KiB
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, openssl, zlib }:
stdenv.mkDerivation rec {
pname = "ncrack";
version = "0.7";
src = fetchFromGitHub {
owner = "nmap";
repo = "ncrack";
rev = version;
sha256 = "1gnv5xdd7n04glcpy7q1mkb6f8gdhdrhlrh8z6k4g2pjdhxlz26g";
};
patches = [
# Pull upstream fix for -fno-common toolchains like upstream gcc-10:
# https://github.com/nmap/ncrack/pull/83
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/nmap/ncrack/commit/cc4103267bab6017a4da9d41156d0c1075012eba.patch";
sha256 = "06nlfvc7p108f8ppbcgwmj4iwmjy95xhc1sawa8c78lrx22r7gy3";
})
];
# Our version is good; the check is bad.
configureFlags = [ "--without-zlib-version-check" ];
buildInputs = [ openssl zlib ];
meta = with lib; {
description = "Network authentication tool";
mainProgram = "ncrack";
homepage = "https://nmap.org/ncrack/";
license = licenses.gpl2Only;
maintainers = with maintainers; [ siraben ];
platforms = platforms.unix;
};
}