From a6b8246c91a196d809c10b9a2edde388ff5ae3ee Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Fri, 12 Feb 2021 08:34:53 -0300 Subject: [PATCH] waybar: mpd_clientlib -> libmpdclient --- pkgs/applications/misc/waybar/default.nix | 121 ++++++++++++---------- 1 file changed, 68 insertions(+), 53 deletions(-) diff --git a/pkgs/applications/misc/waybar/default.nix b/pkgs/applications/misc/waybar/default.nix index 8dd18de5d895..0cbe325f62af 100644 --- a/pkgs/applications/misc/waybar/default.nix +++ b/pkgs/applications/misc/waybar/default.nix @@ -1,5 +1,19 @@ -{ lib, stdenv, fetchFromGitHub, meson, pkg-config, ninja, wrapGAppsHook -, wayland, wlroots, gtkmm3, libsigcxx, jsoncpp, fmt, scdoc, spdlog, gtk-layer-shell +{ lib +, stdenv +, fetchFromGitHub +, meson +, pkg-config +, ninja +, wrapGAppsHook +, wayland +, wlroots +, gtkmm3 +, libsigcxx +, jsoncpp +, fmt +, scdoc +, spdlog +, gtk-layer-shell , howard-hinnant-date, cmake , traySupport ? true, libdbusmenu-gtk3 , pulseSupport ? true, libpulseaudio @@ -7,68 +21,69 @@ , nlSupport ? true, libnl , udevSupport ? true, udev , swaySupport ? true, sway -, mpdSupport ? true, mpd_clientlib +, mpdSupport ? true, libmpdclient , withMediaPlayer ? false, glib, gobject-introspection, python3, python38Packages, playerctl }: - stdenv.mkDerivation rec { - pname = "waybar"; - version = "0.9.5"; - src = fetchFromGitHub { - owner = "Alexays"; - repo = "Waybar"; - rev = version; - sha256 = "1kzrgqaclfk6gcwhknxn28xl74gm5swipgn8kk8avacb4nsw1l9q"; - }; +stdenv.mkDerivation rec { + pname = "waybar"; + version = "0.9.5"; - nativeBuildInputs = [ - meson ninja pkg-config scdoc wrapGAppsHook cmake - ] ++ lib.optional withMediaPlayer gobject-introspection; + src = fetchFromGitHub { + owner = "Alexays"; + repo = "Waybar"; + rev = version; + sha256 = "1kzrgqaclfk6gcwhknxn28xl74gm5swipgn8kk8avacb4nsw1l9q"; + }; - propagatedBuildInputs = lib.optionals withMediaPlayer [ - glib - playerctl - python38Packages.pygobject3 - ]; - strictDeps = false; + nativeBuildInputs = [ + meson ninja pkg-config scdoc wrapGAppsHook cmake + ] ++ lib.optional withMediaPlayer gobject-introspection; - buildInputs = with lib; - [ wayland wlroots gtkmm3 libsigcxx jsoncpp fmt spdlog gtk-layer-shell howard-hinnant-date ] - ++ optional traySupport libdbusmenu-gtk3 - ++ optional pulseSupport libpulseaudio - ++ optional sndioSupport sndio - ++ optional nlSupport libnl - ++ optional udevSupport udev - ++ optional swaySupport sway - ++ optional mpdSupport mpd_clientlib; + propagatedBuildInputs = lib.optionals withMediaPlayer [ + glib + playerctl + python38Packages.pygobject3 + ]; + strictDeps = false; - mesonFlags = (lib.mapAttrsToList - (option: enable: "-D${option}=${if enable then "enabled" else "disabled"}") - { - dbusmenu-gtk = traySupport; - pulseaudio = pulseSupport; - sndio = sndioSupport; - libnl = nlSupport; - libudev = udevSupport; - mpd = mpdSupport; - } - ) ++ [ - "-Dout=${placeholder "out"}" - "-Dsystemd=disabled" - ]; + buildInputs = with lib; + [ wayland wlroots gtkmm3 libsigcxx jsoncpp fmt spdlog gtk-layer-shell howard-hinnant-date ] + ++ optional traySupport libdbusmenu-gtk3 + ++ optional pulseSupport libpulseaudio + ++ optional sndioSupport sndio + ++ optional nlSupport libnl + ++ optional udevSupport udev + ++ optional swaySupport sway + ++ optional mpdSupport libmpdclient; - preFixup = lib.optional withMediaPlayer '' + mesonFlags = (lib.mapAttrsToList + (option: enable: "-D${option}=${if enable then "enabled" else "disabled"}") + { + dbusmenu-gtk = traySupport; + pulseaudio = pulseSupport; + sndio = sndioSupport; + libnl = nlSupport; + libudev = udevSupport; + mpd = mpdSupport; + } + ) ++ [ + "-Dout=${placeholder "out"}" + "-Dsystemd=disabled" + ]; + + preFixup = lib.optional withMediaPlayer '' cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py wrapProgram $out/bin/waybar-mediaplayer.py \ --prefix PYTHONPATH : "$PYTHONPATH:$out/${python3.sitePackages}" ''; - meta = with lib; { - description = "Highly customizable Wayland bar for Sway and Wlroots based compositors"; - license = licenses.mit; - maintainers = with maintainers; [ FlorianFranzen minijackson synthetica ]; - platforms = platforms.unix; - homepage = "https://github.com/alexays/waybar"; - }; - } + meta = with lib; { + description = "Highly customizable Wayland bar for Sway and Wlroots based compositors"; + license = licenses.mit; + maintainers = with maintainers; [ FlorianFranzen minijackson synthetica ]; + platforms = platforms.unix; + homepage = "https://github.com/alexays/waybar"; + }; +}