Merge pull request #130124 from SuperSandro2000/polybar
This commit is contained in:
commit
f7dd9ff03c
1 changed files with 74 additions and 73 deletions
|
@ -1,4 +1,5 @@
|
|||
{ cairo
|
||||
{ config
|
||||
, cairo
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, libXdmcp
|
||||
|
@ -29,87 +30,87 @@
|
|||
, i3-gaps
|
||||
, jsoncpp
|
||||
|
||||
# override the variables ending in 'Support' to enable or disable modules
|
||||
, alsaSupport ? true
|
||||
# override the variables ending in 'Support' to enable or disable modules
|
||||
, alsaSupport ? true
|
||||
, githubSupport ? false
|
||||
, mpdSupport ? false
|
||||
, pulseSupport ? false
|
||||
, iwSupport ? false
|
||||
, nlSupport ? true
|
||||
, i3Support ? false
|
||||
, mpdSupport ? false
|
||||
, pulseSupport ? config.pulseaudio or false
|
||||
, iwSupport ? false
|
||||
, nlSupport ? true
|
||||
, i3Support ? false
|
||||
, i3GapsSupport ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "polybar";
|
||||
version = "3.5.6";
|
||||
pname = "polybar";
|
||||
version = "3.5.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-Uvj9V2M/uQxyziTx1hecrcaQZECijlpVmWcUeT+PqrI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-Uvj9V2M/uQxyziTx1hecrcaQZECijlpVmWcUeT+PqrI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
python3Packages.sphinx
|
||||
removeReferencesTo
|
||||
]
|
||||
++ lib.optional (i3Support || i3GapsSupport) makeWrapper;
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
python3Packages.sphinx
|
||||
removeReferencesTo
|
||||
] ++ lib.optional (i3Support || i3GapsSupport) makeWrapper;
|
||||
|
||||
buildInputs = [
|
||||
cairo
|
||||
libXdmcp
|
||||
libpthreadstubs
|
||||
libxcb
|
||||
pcre
|
||||
python3
|
||||
xcbproto
|
||||
xcbutil
|
||||
xcbutilcursor
|
||||
xcbutilimage
|
||||
xcbutilrenderutil
|
||||
xcbutilwm
|
||||
xcbutilxrm
|
||||
]
|
||||
++ lib.optional alsaSupport alsa-lib
|
||||
++ lib.optional githubSupport curl
|
||||
++ lib.optional mpdSupport libmpdclient
|
||||
++ lib.optional pulseSupport libpulseaudio
|
||||
++ lib.optional iwSupport wirelesstools
|
||||
++ lib.optional nlSupport libnl
|
||||
++ lib.optional (i3Support || i3GapsSupport) jsoncpp
|
||||
++ lib.optional i3Support i3
|
||||
++ lib.optional i3GapsSupport i3-gaps;
|
||||
buildInputs = [
|
||||
cairo
|
||||
libXdmcp
|
||||
libpthreadstubs
|
||||
libxcb
|
||||
pcre
|
||||
python3
|
||||
xcbproto
|
||||
xcbutil
|
||||
xcbutilcursor
|
||||
xcbutilimage
|
||||
xcbutilrenderutil
|
||||
xcbutilwm
|
||||
xcbutilxrm
|
||||
] ++ lib.optional alsaSupport alsa-lib
|
||||
++ lib.optional githubSupport curl
|
||||
++ lib.optional mpdSupport libmpdclient
|
||||
++ lib.optional pulseSupport libpulseaudio
|
||||
++ lib.optional iwSupport wirelesstools
|
||||
++ lib.optional nlSupport libnl
|
||||
++ lib.optional (i3Support || i3GapsSupport) jsoncpp
|
||||
++ lib.optional i3Support i3
|
||||
++ lib.optional i3GapsSupport i3-gaps;
|
||||
|
||||
postInstall = if i3Support
|
||||
then ''wrapProgram $out/bin/polybar \
|
||||
--prefix PATH : "${i3}/bin"
|
||||
''
|
||||
else if i3GapsSupport
|
||||
then ''wrapProgram $out/bin/polybar \
|
||||
--prefix PATH : "${i3-gaps}/bin"
|
||||
''
|
||||
else '''';
|
||||
postInstall =
|
||||
if i3Support then ''
|
||||
wrapProgram $out/bin/polybar \
|
||||
--prefix PATH : "${i3}/bin"
|
||||
''
|
||||
else if i3GapsSupport
|
||||
then ''
|
||||
wrapProgram $out/bin/polybar \
|
||||
--prefix PATH : "${i3-gaps}/bin"
|
||||
''
|
||||
else "";
|
||||
|
||||
postFixup = ''
|
||||
remove-references-to -t ${stdenv.cc} $out/bin/polybar
|
||||
postFixup = ''
|
||||
remove-references-to -t ${stdenv.cc} $out/bin/polybar
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://polybar.github.io/";
|
||||
changelog = "https://github.com/polybar/polybar/releases/tag/${version}";
|
||||
description = "A fast and easy-to-use tool for creating status bars";
|
||||
longDescription = ''
|
||||
Polybar aims to help users build beautiful and highly customizable
|
||||
status bars for their desktop environment, without the need of
|
||||
having a black belt in shell scripting.
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://polybar.github.io/";
|
||||
changelog = "https://github.com/polybar/polybar/releases/tag/${version}";
|
||||
description = "A fast and easy-to-use tool for creating status bars";
|
||||
longDescription = ''
|
||||
Polybar aims to help users build beautiful and highly customizable
|
||||
status bars for their desktop environment, without the need of
|
||||
having a black belt in shell scripting.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ afldcr Br1ght0ne fortuneteller2k ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ afldcr Br1ght0ne fortuneteller2k ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue