tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
waybar: mpd_clientlib -> libmpdclient
AndersonTorres
5 years ago
a6b8246c
9ac26e0f
+68
-53
1 changed file
expand all
collapse all
unified
split
pkgs
applications
misc
waybar
default.nix
+68
-53
pkgs/applications/misc/waybar/default.nix
···
1
-
{ lib, stdenv, fetchFromGitHub, meson, pkg-config, ninja, wrapGAppsHook
2
-
, wayland, wlroots, gtkmm3, libsigcxx, jsoncpp, fmt, scdoc, spdlog, gtk-layer-shell
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
, howard-hinnant-date, cmake
4
, traySupport ? true, libdbusmenu-gtk3
5
, pulseSupport ? true, libpulseaudio
···
7
, nlSupport ? true, libnl
8
, udevSupport ? true, udev
9
, swaySupport ? true, sway
10
-
, mpdSupport ? true, mpd_clientlib
11
, withMediaPlayer ? false, glib, gobject-introspection, python3, python38Packages, playerctl
12
}:
13
-
stdenv.mkDerivation rec {
14
-
pname = "waybar";
15
-
version = "0.9.5";
0
16
17
-
src = fetchFromGitHub {
18
-
owner = "Alexays";
19
-
repo = "Waybar";
20
-
rev = version;
21
-
sha256 = "1kzrgqaclfk6gcwhknxn28xl74gm5swipgn8kk8avacb4nsw1l9q";
22
-
};
23
24
-
nativeBuildInputs = [
25
-
meson ninja pkg-config scdoc wrapGAppsHook cmake
26
-
] ++ lib.optional withMediaPlayer gobject-introspection;
27
28
-
propagatedBuildInputs = lib.optionals withMediaPlayer [
29
-
glib
30
-
playerctl
31
-
python38Packages.pygobject3
32
-
];
33
-
strictDeps = false;
34
35
-
buildInputs = with lib;
36
-
[ wayland wlroots gtkmm3 libsigcxx jsoncpp fmt spdlog gtk-layer-shell howard-hinnant-date ]
37
-
++ optional traySupport libdbusmenu-gtk3
38
-
++ optional pulseSupport libpulseaudio
39
-
++ optional sndioSupport sndio
40
-
++ optional nlSupport libnl
41
-
++ optional udevSupport udev
42
-
++ optional swaySupport sway
43
-
++ optional mpdSupport mpd_clientlib;
44
45
-
mesonFlags = (lib.mapAttrsToList
46
-
(option: enable: "-D${option}=${if enable then "enabled" else "disabled"}")
47
-
{
48
-
dbusmenu-gtk = traySupport;
49
-
pulseaudio = pulseSupport;
50
-
sndio = sndioSupport;
51
-
libnl = nlSupport;
52
-
libudev = udevSupport;
53
-
mpd = mpdSupport;
54
-
}
55
-
) ++ [
56
-
"-Dout=${placeholder "out"}"
57
-
"-Dsystemd=disabled"
58
-
];
59
60
-
preFixup = lib.optional withMediaPlayer ''
61
cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py
62
63
wrapProgram $out/bin/waybar-mediaplayer.py \
64
--prefix PYTHONPATH : "$PYTHONPATH:$out/${python3.sitePackages}"
65
'';
66
67
-
meta = with lib; {
68
-
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors";
69
-
license = licenses.mit;
70
-
maintainers = with maintainers; [ FlorianFranzen minijackson synthetica ];
71
-
platforms = platforms.unix;
72
-
homepage = "https://github.com/alexays/waybar";
73
-
};
74
-
}
···
1
+
{ lib
2
+
, stdenv
3
+
, fetchFromGitHub
4
+
, meson
5
+
, pkg-config
6
+
, ninja
7
+
, wrapGAppsHook
8
+
, wayland
9
+
, wlroots
10
+
, gtkmm3
11
+
, libsigcxx
12
+
, jsoncpp
13
+
, fmt
14
+
, scdoc
15
+
, spdlog
16
+
, gtk-layer-shell
17
, howard-hinnant-date, cmake
18
, traySupport ? true, libdbusmenu-gtk3
19
, pulseSupport ? true, libpulseaudio
···
21
, nlSupport ? true, libnl
22
, udevSupport ? true, udev
23
, swaySupport ? true, sway
24
+
, mpdSupport ? true, libmpdclient
25
, withMediaPlayer ? false, glib, gobject-introspection, python3, python38Packages, playerctl
26
}:
27
+
28
+
stdenv.mkDerivation rec {
29
+
pname = "waybar";
30
+
version = "0.9.5";
31
32
+
src = fetchFromGitHub {
33
+
owner = "Alexays";
34
+
repo = "Waybar";
35
+
rev = version;
36
+
sha256 = "1kzrgqaclfk6gcwhknxn28xl74gm5swipgn8kk8avacb4nsw1l9q";
37
+
};
38
39
+
nativeBuildInputs = [
40
+
meson ninja pkg-config scdoc wrapGAppsHook cmake
41
+
] ++ lib.optional withMediaPlayer gobject-introspection;
42
43
+
propagatedBuildInputs = lib.optionals withMediaPlayer [
44
+
glib
45
+
playerctl
46
+
python38Packages.pygobject3
47
+
];
48
+
strictDeps = false;
49
50
+
buildInputs = with lib;
51
+
[ wayland wlroots gtkmm3 libsigcxx jsoncpp fmt spdlog gtk-layer-shell howard-hinnant-date ]
52
+
++ optional traySupport libdbusmenu-gtk3
53
+
++ optional pulseSupport libpulseaudio
54
+
++ optional sndioSupport sndio
55
+
++ optional nlSupport libnl
56
+
++ optional udevSupport udev
57
+
++ optional swaySupport sway
58
+
++ optional mpdSupport libmpdclient;
59
60
+
mesonFlags = (lib.mapAttrsToList
61
+
(option: enable: "-D${option}=${if enable then "enabled" else "disabled"}")
62
+
{
63
+
dbusmenu-gtk = traySupport;
64
+
pulseaudio = pulseSupport;
65
+
sndio = sndioSupport;
66
+
libnl = nlSupport;
67
+
libudev = udevSupport;
68
+
mpd = mpdSupport;
69
+
}
70
+
) ++ [
71
+
"-Dout=${placeholder "out"}"
72
+
"-Dsystemd=disabled"
73
+
];
74
75
+
preFixup = lib.optional withMediaPlayer ''
76
cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py
77
78
wrapProgram $out/bin/waybar-mediaplayer.py \
79
--prefix PYTHONPATH : "$PYTHONPATH:$out/${python3.sitePackages}"
80
'';
81
82
+
meta = with lib; {
83
+
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors";
84
+
license = licenses.mit;
85
+
maintainers = with maintainers; [ FlorianFranzen minijackson synthetica ];
86
+
platforms = platforms.unix;
87
+
homepage = "https://github.com/alexays/waybar";
88
+
};
89
+
}