Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waybar: add systemdSupport input #345107

Merged
merged 2 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion nixos/modules/programs/wayland/waybar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ in
{
options.programs.waybar = {
enable = lib.mkEnableOption "waybar, a highly customizable Wayland bar for Sway and Wlroots based compositors";
package = lib.mkPackageOption pkgs "waybar" { };
package =
lib.mkPackageOption pkgs "waybar" { }
// lib.mkOption {
apply = pkg: pkg.override { systemdSupport = true; };
};
};

config = lib.mkIf cfg.enable {
Expand Down
9 changes: 7 additions & 2 deletions pkgs/by-name/wa/waybar/package.nix
JohnRTitor marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
scdoc,
sndio,
spdlog,
systemdMinimal,
sway,
udev,
upower,
Expand All @@ -60,6 +61,7 @@
rfkillSupport ? true,
runTests ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
sndioSupport ? true,
systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
swaySupport ? true,
traySupport ? true,
udevSupport ? true,
Expand Down Expand Up @@ -153,6 +155,7 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optional pulseSupport libpulseaudio
++ lib.optional sndioSupport sndio
++ lib.optional swaySupport sway
++ lib.optional systemdSupport systemdMinimal
++ lib.optional traySupport libdbusmenu-gtk3
++ lib.optional udevSupport udev
++ lib.optional upowerSupport upower
Expand All @@ -179,14 +182,16 @@ stdenv.mkDerivation (finalAttrs: {
"pulseaudio" = pulseSupport;
"rfkill" = rfkillSupport;
"sndio" = sndioSupport;
"systemd" = true;
"systemd" = systemdSupport;
"tests" = runTests;
"upower_glib" = upowerSupport;
"wireplumber" = wireplumberSupport;
})
++ lib.optional experimentalPatches (lib.mesonBool "experimental" true);

PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
env = lib.optionalAttrs systemdSupport {
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
};

postPatch = ''
substituteInPlace include/util/command.hpp \
Expand Down