From 1c3aa30c3d812cea7127cfa4be6763c19d4b7eb3 Mon Sep 17 00:00:00 2001 From: Jack Kelly Date: Mon, 20 May 2019 18:37:11 +1000 Subject: [PATCH] arandr: Use wrapGAppsHook This stops arandr from crashing if it tries to open a dialog box. Note: the hook doesn't play nicely with gobject-introspection unless strictDeps = false. See NixOS#56943. --- pkgs/tools/X11/arandr/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/X11/arandr/default.nix b/pkgs/tools/X11/arandr/default.nix index 5baba117157..51f2f5ec249 100644 --- a/pkgs/tools/X11/arandr/default.nix +++ b/pkgs/tools/X11/arandr/default.nix @@ -1,4 +1,7 @@ -{ stdenv, fetchurl, gobject-introspection, gtk3, xrandr, python3Packages }: +{ stdenv, fetchurl, python3Packages +, gobject-introspection, gsettings-desktop-schemas, gtk3 +, wrapGAppsHook, xrandr +}: let inherit (python3Packages) buildPythonApplication docutils pygobject3; @@ -17,13 +20,13 @@ in buildPythonApplication rec { # no tests doCheck = false; - buildInputs = [ docutils ]; - nativeBuildInputs = [ gobject-introspection gtk3 ]; - propagatedBuildInputs = [ xrandr pygobject3 ]; + # hook for gobject-introspection doesn't like strictDeps + # https://github.com/NixOS/nixpkgs/issues/56943 + strictDeps = false; - makeWrapperArgs = [ - "--set GI_TYPELIB_PATH $GI_TYPELIB_PATH" - ]; + buildInputs = [ docutils gsettings-desktop-schemas gtk3 ]; + nativeBuildInputs = [ gobject-introspection wrapGAppsHook ]; + propagatedBuildInputs = [ xrandr pygobject3 ]; meta = { homepage = http://christian.amsuess.com/tools/arandr/;