1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/window-managers/i3/pystatus.nix

60 lines
1.6 KiB
Nix
Raw Normal View History

2020-06-11 10:43:37 +01:00
{ stdenv
, fetchFromGitHub
, libpulseaudio
, libnotify
, gobject-introspection
, python3Packages
, wrapGAppsHook
, extraLibs ? [] }:
python3Packages.buildPythonApplication rec {
2018-04-11 08:42:26 +01:00
# i3pystatus moved to rolling release:
# https://github.com/enkore/i3pystatus/issues/584
2020-06-15 08:34:06 +01:00
version = "unstable-2020-06-12";
2016-02-24 19:33:21 +00:00
pname = "i3pystatus";
2020-06-15 08:34:06 +01:00
src = fetchFromGitHub {
2018-04-11 08:42:26 +01:00
owner = "enkore";
repo = "i3pystatus";
2020-06-15 08:34:06 +01:00
rev = "dad5eb0c5c8a2ecd20c37ade4732586c6e53f44b";
sha256 = "18ygvkl92yr69kxsym57k1mc90asdxpz4b943i61qr0s4fc5n4mq";
2016-02-24 19:33:21 +00:00
};
2020-06-11 10:43:37 +01: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 08:34:06 +01:00
makeWrapperArgs = [
2020-06-11 10:43:37 +01:00
# LC_TIME != C results in locale.Error: unsupported locale setting
2020-06-15 08:34:06 +01:00
"--set" "LC_TIME" "C"
2020-06-11 10:43:37 +01:00
"--suffix" "LD_LIBRARY_PATH" ":" "${stdenv.lib.makeLibraryPath [ libpulseaudio ]}"
];
2020-06-15 08:34:06 +01:00
2020-06-11 10:43:37 +01:00
postPatch = ''
makeWrapperArgs+=(--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH")
2020-06-15 08:34:06 +01: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 10:43:37 +01:00
''${makeWrapperArgs[@]}
2016-02-24 19:33:21 +00:00
'';
# no tests in tarball
doCheck = false;
meta = with stdenv.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 ];
};
}