From 5360dec935e26d5b76eb53c42e4c45f6608f05e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 11 Jun 2020 10:43:37 +0100 Subject: [PATCH] i3pystatus: fix desktop notifications --- .../window-managers/i3/pystatus.nix | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/window-managers/i3/pystatus.nix b/pkgs/applications/window-managers/i3/pystatus.nix index 1a6d3d591e1d..beefdaf891c6 100644 --- a/pkgs/applications/window-managers/i3/pystatus.nix +++ b/pkgs/applications/window-managers/i3/pystatus.nix @@ -1,8 +1,13 @@ -{ stdenv, fetchFromGitHub, libpulseaudio, python3Packages, extraLibs ? [] }: +{ stdenv +, fetchFromGitHub +, libpulseaudio +, libnotify +, gobject-introspection +, python3Packages +, wrapGAppsHook +, extraLibs ? [] }: -let - ldWrapperSuffix = "--suffix LD_LIBRARY_PATH : \"${stdenv.lib.makeLibraryPath [ libpulseaudio ]}\""; -in python3Packages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { # i3pystatus moved to rolling release: # https://github.com/enkore/i3pystatus/issues/584 version = "unstable-2020-06-12"; @@ -15,23 +20,26 @@ in python3Packages.buildPythonApplication rec { sha256 = "18ygvkl92yr69kxsym57k1mc90asdxpz4b943i61qr0s4fc5n4mq"; }; - propagatedBuildInputs = with python3Packages; [ keyring colour netifaces psutil basiciw ] ++ - [ libpulseaudio ] ++ extraLibs; + buildInputs = [ libpulseaudio libnotify gobject-introspection ]; + + propagatedBuildInputs = with python3Packages; [ + keyring colour netifaces psutil basiciw pygobject3 + ] ++ extraLibs; - # LC_TIME != C results in locale.Error: unsupported locale setting makeWrapperArgs = [ + # LC_TIME != C results in locale.Error: unsupported locale setting "--set" "LC_TIME" "C" - ldWrapperSuffix - ]; # libpulseaudio.so is loaded manually + "--suffix" "LD_LIBRARY_PATH" ":" "${stdenv.lib.makeLibraryPath [ libpulseaudio ]}" + ]; - postConfigure = '' - makeWrapperArgs+=("--set" "GI_TYPELIB_PATH" "$GI_TYPELIB_PATH") + postPatch = '' + makeWrapperArgs+=(--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH") ''; postInstall = '' makeWrapper ${python3Packages.python.interpreter} $out/bin/${pname}-python-interpreter \ --prefix PYTHONPATH : "$PYTHONPATH" \ - ${ldWrapperSuffix} + ''${makeWrapperArgs[@]} ''; # no tests in tarball