@@ -1,8 +1,13 @@
1−{ stdenv, fetchFromGitHub, libpulseaudio, python3Packages, extraLibs ? [] }:
2−
3−let
4− ldWrapperSuffix = "--suffix LD_LIBRARY_PATH : \"${stdenv.lib.makeLibraryPath [ libpulseaudio ]}\"";
5−in python3Packages.buildPythonApplication rec {
1+{ stdenv
2+, fetchFromGitHub
3+, libpulseaudio
4+, libnotify
5+, gobject-introspection
6+, python3Packages
7+, wrapGAppsHook
8+, extraLibs ? [] }:
9+
10+python3Packages.buildPythonApplication rec {
611 # i3pystatus moved to rolling release:
712 # https://github.com/enkore/i3pystatus/issues/584
813 version = "unstable-2020-06-12";
@@ -15,23 +20,26 @@ in python3Packages.buildPythonApplication rec {
1520 sha256 = "18ygvkl92yr69kxsym57k1mc90asdxpz4b943i61qr0s4fc5n4mq";
1621 };
1722
18− propagatedBuildInputs = with python3Packages; [ keyring colour netifaces psutil basiciw ] ++
19− [ libpulseaudio ] ++ extraLibs;
23+ buildInputs = [ libpulseaudio libnotify gobject-introspection ];
24+
25+ propagatedBuildInputs = with python3Packages; [
26+ keyring colour netifaces psutil basiciw pygobject3
27+ ] ++ extraLibs;
2028
21− # LC_TIME != C results in locale.Error: unsupported locale setting
2229 makeWrapperArgs = [
30+ # LC_TIME != C results in locale.Error: unsupported locale setting
2331 "--set" "LC_TIME" "C"
24− ldWrapperSuffix
25− ]; # libpulseaudio.so is loaded manually
32+ "--suffix" "LD_LIBRARY_PATH" ":" "${stdenv.lib.makeLibraryPath [ libpulseaudio ]}"
33+ ];
2634
27− postConfigure = ''
28− makeWrapperArgs+=("--set" "GI_TYPELIB_PATH" "$GI_TYPELIB_PATH")
35+ postPatch = ''
36+ makeWrapperArgs+=(--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH")
2937 '';
3038
3139 postInstall = ''
3240 makeWrapper ${python3Packages.python.interpreter} $out/bin/${pname}-python-interpreter \
3341 --prefix PYTHONPATH : "$PYTHONPATH" \
34− ${ldWrapperSuffix}
42+ ''${makeWrapperArgs[@]}
3543 '';
3644
3745 # no tests in tarball