incus: fix container tests from image rename (#360305)
[NixPkgs.git] / pkgs / by-name / un / unhide-gui / package.nix
bloba8c988ee6d2d1576edf0ab2e4971e6467a3ecf3b
2   fetchFromGitHub,
3   lib,
4   python3Packages,
5   unhide,
6 }:
8 python3Packages.buildPythonApplication rec {
9   pname = "unhide-gui";
10   version = "20220611";
11   format = "other";
13   src = fetchFromGitHub {
14     owner = "YJesus";
15     repo = "Unhide";
16     rev = "v${version}";
17     hash = "sha256-v4otbDhKKRLywH6aP+mbMR0olHbW+jk4TXTBY+iaxdo=";
18   };
20   propagatedBuildInputs = with python3Packages; [ tkinter ];
22   buildInputs = [ unhide ];
24   postPatch = ''
25     substituteInPlace unhideGui.py \
26       --replace-fail "\This" "This" \
27       --replace-fail "__credits__" "#__credits__" \
28       --replace-fail "./unhide-linux" "${unhide}/bin/unhide-linux" \
29       --replace-fail "./unhide-tcp" "${unhide}/bin/unhide-tcp"
30   '';
32   installPhase = ''
33     runHook preInstall
35     mkdir -p $out/{bin,share/unhideGui}
36     cp -R *.py $out/share/unhideGui
38     runHook postInstall
39   '';
41   fixupPhase = ''
42     runHook preFixup
44     makeWrapper "${python3Packages.python.interpreter}" "$out/bin/unhideGui" \
45       --set PYTHONPATH "$PYTHONPATH" \
46       --add-flags "$out/share/unhideGui/unhideGui.py"
48     runHook postFixup
49   '';
51   meta = {
52     description = "Forensic tool to find hidden processes and TCP/UDP ports by rootkits, LKMs or other hiding technique";
53     homepage = "https://github.com/YJesus/Unhide";
54     changelog = "https://github.com/YJesus/Unhide/blob/${src.rev}/NEWS";
55     license = lib.licenses.gpl3Only;
56     maintainers = with lib.maintainers; [ tochiaha ];
57     mainProgram = "unhide-gui";
58     platforms = lib.platforms.all;
59   };