From d94fc9fe703ed378e4d6a936bc47276e79fc1f90 Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Thu, 30 Jan 2025 20:20:29 +0100 Subject: [PATCH] added exit0 from https://sigma-star.at/blog/2024/02/exit0-code-injection/ --- mods/nurPkgs/exit0.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 mods/nurPkgs/exit0.nix diff --git a/mods/nurPkgs/exit0.nix b/mods/nurPkgs/exit0.nix new file mode 100644 index 0000000..fe1ce7f --- /dev/null +++ b/mods/nurPkgs/exit0.nix @@ -0,0 +1,35 @@ +{ stdenv +, fetchFromGitHub +, meson +}: + +stdenv.mkDerivation rec { + name = "exitß"; + + src = fetchFromGitHub { + owner = "richardweinberger"; + repo = "exit0"; + rev = "f6cdeeb858ad9717b698a21e6fec3bb94b2aa2dd"; + sha256 = ""; + }; + + nativeBuildInputs = [ + meson + ]; + + buildInputs = [ + ]; + + meta = with lib; { + description = "Kill programs so that they exit with a 0 exit code, by injecting code with debug apis"; + longDescription = '' + Killing programs results into non-zero exit codes and monitoring/parent processes will notice. There are situations where you want to forcefully kill a program but make it look like a graceful exit. + + Further reading: https://sigma-star.at/blog/2024/02/exit0-code-injection/ + ''; + homepage = "https://github.com/richardweinberger/exit0"; + license = licenses.gpl2Only; + #maintainers = [ ]; + platforms = platforms.all; + }; +}