Merge pull request #171953 from Artturin/netcatbsd

netcat-openbsd: init at 1.218-5
This commit is contained in:
Sandro 2022-05-08 23:59:19 +02:00 committed by GitHub
commit fd9aa19396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 60 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ lib, python3 }:
{ lib, python3, netcat-openbsd }:
python3.pkgs.buildPythonApplication rec {
pname = "flashfocus";
@ -12,6 +12,9 @@ python3.pkgs.buildPythonApplication rec {
postPatch = ''
substituteInPlace setup.py \
--replace "pyyaml>=5.1,<6.0" "pyyaml>=5.1"
substituteInPlace bin/nc_flash_window \
--replace "nc" "${lib.getExe netcat-openbsd}"
'';
nativeBuildInputs = with python3.pkgs; [

View File

@ -0,0 +1,54 @@
{ lib, stdenv, fetchFromGitLab, pkg-config, libbsd, installShellFiles }:
stdenv.mkDerivation rec {
pname = "netcat-openbsd";
version = "1.218-5";
src = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "debian";
repo = "netcat-openbsd";
rev = "refs/tags/debian/${version}";
sha256 = "sha256-jEJ8x49Z1UN2qOChGp173aQuPkgl2fWwUUJgUdOv60I=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config installShellFiles ];
buildInputs = [ libbsd ];
NIX_CFLAGS_COMPILE = [
"-I${lib.getDev libbsd}/include/libbsd"
];
NIX_LDFLAGS = [ "-lbsd" ];
postPatch = ''
for file in $(cat debian/patches/series); do
patch -p1 < debian/patches/$file
done
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv nc $out/bin/nc
installManPage nc.1
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/nc -h 2> /dev/null
'';
meta = with lib; {
description = "TCP/IP swiss army knife. OpenBSD variant";
homepage = "https://salsa.debian.org/debian/netcat-openbsd";
maintainers = with maintainers; [ artturin ];
license = licenses.bsd3;
platforms = platforms.unix;
mainProgram = "nc";
};
}

View File

@ -850,7 +850,6 @@ mapAliases ({
navit = throw "navit has been removed from nixpkgs, due to being unmaintained"; # Added 2021-06-07
ncat = throw "'ncat' has been renamed to/replaced by 'nmap'"; # Converted to throw 2022-02-22
neap = throw "neap was removed from nixpkgs, as it relies on python2"; # Added 2022-01-12
netcat-openbsd = throw "'netcat-openbsd' has been renamed to/replaced by 'libressl.nc'"; # Converted to throw 2022-02-22
netease-cloud-music = throw "netease-cloud-music has been removed together with deepin"; # Added 2020-08-31
networkmanager_fortisslvpn = throw "'networkmanager_fortisslvpn' has been renamed to/replaced by 'networkmanager-fortisslvpn'"; # Converted to throw 2022-02-22
networkmanager_iodine = throw "'networkmanager_iodine' has been renamed to/replaced by 'networkmanager-iodine'"; # Converted to throw 2022-02-22

View File

@ -8559,6 +8559,8 @@ with pkgs;
netcat-gnu = callPackage ../tools/networking/netcat { };
netcat-openbsd = callPackage ../tools/networking/netcat-openbsd { };
netdiscover = callPackage ../tools/networking/netdiscover { };
nethogs = callPackage ../tools/networking/nethogs { };