nixpkgs/pkgs/applications/window-managers/i3/pystatus.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
2020-06-11 09:43:37 +00:00
, fetchFromGitHub
, libpulseaudio
, libnotify
, gobject-introspection
, python3Packages
, extraLibs ? [] }:
python3Packages.buildPythonApplication rec {
2018-04-11 07:42:26 +00:00
# i3pystatus moved to rolling release:
# https://github.com/enkore/i3pystatus/issues/584
2020-06-15 07:34:06 +00:00
version = "unstable-2020-06-12";
2016-02-24 19:33:21 +00:00
pname = "i3pystatus";
2020-06-15 07:34:06 +00:00
src = fetchFromGitHub {
2018-04-11 07:42:26 +00:00
owner = "enkore";
repo = "i3pystatus";
2020-06-15 07:34:06 +00:00
rev = "dad5eb0c5c8a2ecd20c37ade4732586c6e53f44b";
sha256 = "18ygvkl92yr69kxsym57k1mc90asdxpz4b943i61qr0s4fc5n4mq";
2016-02-24 19:33:21 +00:00
};
2020-06-11 09:43:37 +00:00
buildInputs = [ libpulseaudio libnotify gobject-introspection ];
propagatedBuildInputs = with python3Packages; [
keyring colour netifaces psutil basiciw pygobject3
] ++ extraLibs;
2016-02-24 19:33:21 +00:00
2020-06-15 07:34:06 +00:00
makeWrapperArgs = [
2020-06-11 09:43:37 +00:00
# LC_TIME != C results in locale.Error: unsupported locale setting
2020-06-15 07:34:06 +00:00
"--set" "LC_TIME" "C"
2021-01-15 13:21:58 +00:00
"--suffix" "LD_LIBRARY_PATH" ":" "${lib.makeLibraryPath [ libpulseaudio ]}"
2020-06-11 09:43:37 +00:00
];
2020-06-15 07:34:06 +00:00
2020-06-11 09:43:37 +00:00
postPatch = ''
makeWrapperArgs+=(--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH")
2020-06-15 07:34:06 +00:00
'';
2016-02-24 19:33:21 +00:00
postInstall = ''
makeWrapper ${python3Packages.python.interpreter} $out/bin/${pname}-python-interpreter \
--prefix PYTHONPATH : "$PYTHONPATH" \
2020-06-11 09:43:37 +00:00
''${makeWrapperArgs[@]}
2016-02-24 19:33:21 +00:00
'';
# no tests in tarball
doCheck = false;
meta = with lib; {
homepage = "https://github.com/enkore/i3pystatus";
2016-02-24 19:33:21 +00:00
description = "A complete replacement for i3status";
longDescription = ''
i3pystatus is a growing collection of python scripts for status output compatible
to i3status / i3bar of the i3 window manager.
'';
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.igsha ];
};
}