Skip to content

Commit

Permalink
knock: init at 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
theobori committed Dec 3, 2024
1 parent 7d0c987 commit bed6f9f
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkgs/by-name/kn/knock/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
libpcap,
autoreconfHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "knock";
version = "0.8";

src = fetchFromGitHub {
owner = "jvinet";
repo = "knock";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-GOg6wovyr6J5qHm5EsOxrposFtwwx/FyJs7g0dagFmk=";
};

nativeBuildInputs = [
autoreconfHook
pkg-config
];

buildInputs = [
libpcap
];

postPatch = ''
substituteInPlace Makefile.am \
--replace-fail "sbin_PROGRAMS = knockd" "bin_PROGRAMS += knockd" \
--replace-fail "dist_sbin_SCRIPTS = src/knock_helper_ipt.sh" "" \
--replace-fail "sysconf_DATA = knockd.conf" "" \
--replace-fail "dist_doc_DATA = README.md TODO ChangeLog COPYING" "" \
--replace-fail "src/knock_helper_ipt.sh" ""
'';

meta = {
description = "A port-knocking implementation";
homepage = "https://github.com/jvinet/knock";
changelog = "https://github.com/jvinet/knock/releases";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ theobori ];
mainProgram = "knock";
platforms = lib.platforms.unix;
};
})

0 comments on commit bed6f9f

Please sign in to comment.