about summary refs log tree commit diff
path: root/pkgs/tools/system/throttled/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/system/throttled/default.nix')
-rw-r--r--pkgs/tools/system/throttled/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/tools/system/throttled/default.nix b/pkgs/tools/system/throttled/default.nix
index f09c0480865ff..076cd1c020a76 100644
--- a/pkgs/tools/system/throttled/default.nix
+++ b/pkgs/tools/system/throttled/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, python3Packages, pciutils }:
+{ lib, stdenv, fetchFromGitHub, gobject-introspection, python3Packages, pciutils, wrapGAppsNoGuiHook }:
 
 stdenv.mkDerivation rec {
   pname = "throttled";
@@ -11,7 +11,11 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-0MsPp6y4r/uZB2SplKV+SAiJoxIs2jgOQmQoQQ2ZKwI=";
   };
 
-  nativeBuildInputs = [ python3Packages.wrapPython ];
+  nativeBuildInputs = [
+    gobject-introspection
+    python3Packages.wrapPython
+    wrapGAppsNoGuiHook
+  ];
 
   pythonPath = with python3Packages; [
     configparser
@@ -35,6 +39,12 @@ stdenv.mkDerivation rec {
     runHook postInstall
   '';
 
+  dontWrapGApps = true;
+
+  preFixup = ''
+    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
   postFixup = "wrapPythonPrograms";
 
   meta = with lib; {
@@ -42,6 +52,6 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/erpalma/throttled";
     license = licenses.mit;
     platforms = [ "x86_64-linux" ];
-    maintainers = with maintainers; [ michaelpj ];
+    maintainers = with maintainers; [ ];
   };
 }