From 4378ec4805ea6cb501d566692ddb3c5638d94b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 15 Jun 2020 08:34:06 +0100 Subject: [PATCH 1/2] i3pystatus: 2019-06-10 -> 2020-06-12 --- .../window-managers/i3/pystatus.nix | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/window-managers/i3/pystatus.nix b/pkgs/applications/window-managers/i3/pystatus.nix index 29bda8e4e2b0..1a6d3d591e1d 100644 --- a/pkgs/applications/window-managers/i3/pystatus.nix +++ b/pkgs/applications/window-managers/i3/pystatus.nix @@ -1,26 +1,32 @@ { stdenv, fetchFromGitHub, libpulseaudio, python3Packages, extraLibs ? [] }: -python3Packages.buildPythonApplication rec { +let + ldWrapperSuffix = "--suffix LD_LIBRARY_PATH : \"${stdenv.lib.makeLibraryPath [ libpulseaudio ]}\""; +in python3Packages.buildPythonApplication rec { # i3pystatus moved to rolling release: # https://github.com/enkore/i3pystatus/issues/584 - version = "unstable-2019-06-10"; + version = "unstable-2020-06-12"; pname = "i3pystatus"; - src = fetchFromGitHub - { + src = fetchFromGitHub { owner = "enkore"; repo = "i3pystatus"; - rev = "56ce08d0ff8d5d64950d6b588ebede35a95e0ce2"; - sha256 = "12938860jbcly1xwhd71jvy2dff28pwv9kqh6mab1859148bzmcg"; + rev = "dad5eb0c5c8a2ecd20c37ade4732586c6e53f44b"; + sha256 = "18ygvkl92yr69kxsym57k1mc90asdxpz4b943i61qr0s4fc5n4mq"; }; propagatedBuildInputs = with python3Packages; [ keyring colour netifaces psutil basiciw ] ++ [ libpulseaudio ] ++ extraLibs; - libpulseaudioPath = stdenv.lib.makeLibraryPath [ libpulseaudio ]; - ldWrapperSuffix = "--suffix LD_LIBRARY_PATH : \"${libpulseaudioPath}\""; # LC_TIME != C results in locale.Error: unsupported locale setting - makeWrapperArgs = [ "--set LC_TIME C" ldWrapperSuffix ]; # libpulseaudio.so is loaded manually + makeWrapperArgs = [ + "--set" "LC_TIME" "C" + ldWrapperSuffix + ]; # libpulseaudio.so is loaded manually + + postConfigure = '' + makeWrapperArgs+=("--set" "GI_TYPELIB_PATH" "$GI_TYPELIB_PATH") + ''; postInstall = '' makeWrapper ${python3Packages.python.interpreter} $out/bin/${pname}-python-interpreter \ 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 2/2] 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