diff options
Diffstat (limited to 'pkgs/tools/networking/pwnat/default.nix')
-rw-r--r-- | pkgs/tools/networking/pwnat/default.nix | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/pkgs/tools/networking/pwnat/default.nix b/pkgs/tools/networking/pwnat/default.nix index 780477af2fcb4..ab123973c0a1b 100644 --- a/pkgs/tools/networking/pwnat/default.nix +++ b/pkgs/tools/networking/pwnat/default.nix @@ -1,21 +1,33 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib +, stdenv +, fetchFromGitHub +}: stdenv.mkDerivation rec { - name = "${pname}-${date}"; pname = "pwnat"; - date = "2014-09-08"; + # 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"; src = fetchFromGitHub { owner = "samyk"; repo = pname; - rev = "1d07c2eb53171733831c0cd01e4e96a3204ec446"; - sha256 = "056xhlnf1axa6k90i018xwijkwc9zc7fms35hrkzwgs40g9ybrx5"; + rev = "8ec62cdae53a2d573c9f9c906133ca45bbd3360a"; + sha256 = "sha256-QodNw3ab8/TurKamg6AgMfQ08aalp4j6q663B+sWmRM="; }; + # See https://github.com/samyk/pwnat/issues/28 + preBuild = '' + mkdir obj + ''; + installPhase = '' - mkdir -p $out/bin $out/share/pwnat - cp pwnat $out/bin - cp README* COPYING* $out/share/pwnat + runHook preInstall + + install -D pwnat $out/bin/pwnat + + runHook postInstall ''; meta = with lib; { |