diff options
author | K900 <me@0upti.me> | 2023-07-17 22:07:43 +0300 |
---|---|---|
committer | K900 <me@0upti.me> | 2023-07-17 22:55:14 +0300 |
commit | 050cb731484f3bf78f1c1eb8208ecb0b697522b5 (patch) | |
tree | 3c2730144b1b33ca31ca286fb02864f732bb017a /pkgs/tools/misc/scanmem | |
parent | 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222 (diff) |
scanmem: enable GUI, some drive-by cleanups
Diffstat (limited to 'pkgs/tools/misc/scanmem')
-rw-r--r-- | pkgs/tools/misc/scanmem/default.nix | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/pkgs/tools/misc/scanmem/default.nix b/pkgs/tools/misc/scanmem/default.nix index 0657a40689b56..817e713b229ff 100644 --- a/pkgs/tools/misc/scanmem/default.nix +++ b/pkgs/tools/misc/scanmem/default.nix @@ -1,8 +1,18 @@ -{ lib, stdenv, autoconf, automake, intltool, libtool, fetchFromGitHub, readline }: +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, gobject-introspection +, intltool +, wrapGAppsHook +, procps +, python3 +, readline +}: stdenv.mkDerivation rec { - version = "0.17"; pname = "scanmem"; + version = "0.17"; src = fetchFromGitHub { owner = "scanmem"; @@ -11,12 +21,27 @@ stdenv.mkDerivation rec { sha256 = "17p8sh0rj8yqz36ria5bp48c8523zzw3y9g8sbm2jwq7sc27i7s9"; }; - nativeBuildInputs = [ autoconf automake intltool libtool ]; - buildInputs = [ readline ]; + nativeBuildInputs = [ autoreconfHook gobject-introspection intltool wrapGAppsHook ]; + buildInputs = [ readline python3 ]; + configureFlags = ["--enable-gui"]; + + # we don't need to wrap the main executable, just the GUI + dontWrapGApps = true; - preConfigure = '' - ./autogen.sh + fixupPhase = '' + runHook preFixup + + # replace the upstream launcher which does stupid things + # also add procps because it shells out to `ps` and expects it to be procps + makeWrapper ${python3}/bin/python3 $out/bin/gameconqueror \ + "''${gappsWrapperArgs[@]}" \ + --set PYTHONPATH "${python3.pkgs.makePythonPath [ python3.pkgs.pygobject3 ]}" \ + --prefix PATH : "${procps}/bin" \ + --add-flags "$out/share/gameconqueror/GameConqueror.py" + + runHook postFixup ''; + meta = with lib; { homepage = "https://github.com/scanmem/scanmem"; description = "Memory scanner for finding and poking addresses in executing processes"; |