2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pwnat";
|
2023-07-15 17:15:38 +00:00
|
|
|
# Latest release has an annoying segmentation fault bug, see:
|
|
|
|
# https://github.com/samyk/pwnat/pull/25 . Merging only #25 is impossible due
|
|
|
|
# to major code refactoring.
|
|
|
|
version = "2023-03-31";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "samyk";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "8ec62cdae53a2d573c9f9c906133ca45bbd3360a";
|
|
|
|
sha256 = "sha256-QodNw3ab8/TurKamg6AgMfQ08aalp4j6q663B+sWmRM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# See https://github.com/samyk/pwnat/issues/28
|
|
|
|
preBuild = ''
|
|
|
|
mkdir obj
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D pwnat $out/bin/pwnat
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://samy.pl/pwnat/";
|
|
|
|
description = "ICMP NAT to NAT client-server communication";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [viric];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|