12 , python3Packages # sphinx-build
33 # override the variables ending in 'Support' to enable or disable modules
35 , githubSupport ? false
37 , pulseSupport ? config.pulseaudio or false
43 stdenv.mkDerivation (finalAttrs: {
47 src = fetchFromGitHub {
50 rev = finalAttrs.version;
51 hash = "sha256-5PYKl6Hi4EYEmUBwkV0rLiwxNqIyR5jwm495YnNs0gI=";
52 fetchSubmodules = true;
58 python3Packages.sphinx
60 ] ++ lib.optional i3Support makeWrapper;
77 ] ++ lib.optional alsaSupport alsa-lib
78 ++ lib.optional githubSupport curl
79 ++ lib.optional mpdSupport libmpdclient
80 ++ lib.optional pulseSupport libpulseaudio
81 ++ lib.optional iwSupport wirelesstools
82 ++ lib.optional nlSupport libnl
83 ++ lib.optionals i3Support [ jsoncpp i3 ];
85 patches = [ ./remove-hardcoded-etc.diff ];
87 # Replace hardcoded /etc when copying and reading the default config.
89 substituteInPlace CMakeLists.txt --replace "/etc" $out
90 substituteAllInPlace src/utils/file.cpp
94 lib.optionalString i3Support ''
95 wrapProgram $out/bin/polybar \
96 --prefix PATH : "${i3}/bin"
100 remove-references-to -t ${stdenv.cc} $out/bin/polybar
104 homepage = "https://polybar.github.io/";
105 changelog = "https://github.com/polybar/polybar/releases/tag/${finalAttrs.version}";
106 description = "Fast and easy-to-use tool for creating status bars";
108 Polybar aims to help users build beautiful and highly customizable
109 status bars for their desktop environment, without the need of
110 having a black belt in shell scripting.
112 license = licenses.mit;
113 maintainers = with maintainers; [ afldcr Br1ght0ne moni ];
114 mainProgram = "polybar";
115 platforms = platforms.linux;