diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 41080f1d8965a..4329c501d1248 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -352,7 +352,6 @@ ./programs/xonsh.nix ./programs/xss-lock.nix ./programs/xwayland.nix - ./programs/yabar.nix ./programs/yazi.nix ./programs/ydotool.nix ./programs/yubikey-touch-detector.nix diff --git a/nixos/modules/programs/yabar.nix b/nixos/modules/programs/yabar.nix deleted file mode 100644 index 08d7036a3e392..0000000000000 --- a/nixos/modules/programs/yabar.nix +++ /dev/null @@ -1,187 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: - -let - cfg = config.programs.yabar; - - mapExtra = - v: - lib.concatStringsSep "\n" ( - lib.mapAttrsToList ( - key: val: - "${key} = ${if (builtins.isString val) then "\"${val}\"" else "${builtins.toString val}"};" - ) v - ); - - listKeys = r: builtins.concatStringsSep "," (builtins.map (n: "\"${n}\"") (builtins.attrNames r)); - - configFile = - let - bars = lib.mapAttrsToList (name: cfg: '' - ${name}: { - font: "${cfg.font}"; - position: "${cfg.position}"; - - ${mapExtra cfg.extra} - - block-list: [${listKeys cfg.indicators}] - - ${builtins.concatStringsSep "\n" ( - lib.mapAttrsToList (name: cfg: '' - ${name}: { - exec: "${cfg.exec}"; - align: "${cfg.align}"; - ${mapExtra cfg.extra} - }; - '') cfg.indicators - )} - }; - '') cfg.bars; - in - pkgs.writeText "yabar.conf" '' - bar-list = [${listKeys cfg.bars}]; - ${builtins.concatStringsSep "\n" bars} - ''; -in -{ - options.programs.yabar = { - enable = lib.mkEnableOption "yabar, a status bar for X window managers"; - - package = lib.mkOption { - default = pkgs.yabar-unstable; - defaultText = lib.literalExpression "pkgs.yabar-unstable"; - example = lib.literalExpression "pkgs.yabar"; - type = lib.types.package; - - # `yabar-stable` segfaults under certain conditions. - # remember to update yabar.passthru.tests if nixos switches back to it! - apply = - x: - if x == pkgs.yabar-unstable then - x - else - lib.flip lib.warn x '' - It's not recommended to use `yabar' with `programs.yabar', the (old) stable release - tends to segfault under certain circumstances: - - * https://github.com/geommer/yabar/issues/86 - * https://github.com/geommer/yabar/issues/68 - * https://github.com/geommer/yabar/issues/143 - - Most of them don't occur on master anymore, until a new release is published, it's recommended - to use `yabar-unstable'. - ''; - - description = '' - The package which contains the `yabar` binary. - - Nixpkgs offers both a stable (`yabar`) and unstable (`yabar-unstable`) version of Yabar. - ''; - }; - - bars = lib.mkOption { - default = { }; - type = lib.types.attrsOf ( - lib.types.submodule { - options = { - font = lib.mkOption { - default = "sans bold 9"; - example = "Droid Sans, FontAwesome Bold 9"; - type = lib.types.str; - - description = '' - The font that will be used to draw the status bar. - ''; - }; - - position = lib.mkOption { - default = "top"; - example = "bottom"; - type = lib.types.enum [ - "top" - "bottom" - ]; - - description = '' - The position where the bar will be rendered. - ''; - }; - - extra = lib.mkOption { - default = { }; - type = lib.types.attrsOf lib.types.str; - - description = '' - An attribute set which contains further attributes of a bar. - ''; - }; - - indicators = lib.mkOption { - default = { }; - type = lib.types.attrsOf ( - lib.types.submodule { - options.exec = lib.mkOption { - example = "YABAR_DATE"; - type = lib.types.str; - description = '' - The type of the indicator to be executed. - ''; - }; - - options.align = lib.mkOption { - default = "left"; - example = "right"; - type = lib.types.enum [ - "left" - "center" - "right" - ]; - - description = '' - Whether to align the indicator at the left or right of the bar. - ''; - }; - - options.extra = lib.mkOption { - default = { }; - type = lib.types.attrsOf (lib.types.either lib.types.str lib.types.int); - - description = '' - An attribute set which contains further attributes of a indicator. - ''; - }; - } - ); - - description = '' - Indicators that should be rendered by yabar. - ''; - }; - }; - } - ); - - description = '' - List of bars that should be rendered by yabar. - ''; - }; - }; - - config = lib.mkIf cfg.enable { - systemd.user.services.yabar = { - description = "yabar service"; - wantedBy = [ "graphical-session.target" ]; - partOf = [ "graphical-session.target" ]; - - script = '' - ${cfg.package}/bin/yabar -c ${configFile} - ''; - - serviceConfig.Restart = "always"; - }; - }; -} diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index bd2036e194b8d..d4f6d9588045f 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -71,6 +71,9 @@ in "way-cooler is abandoned by its author: " + "https://way-cooler.org/blog/2020/01/09/way-cooler-post-mortem.html" )) + (mkRemovedOptionModule [ "programs" "yabar" ] + "programs.yabar has been removed from NixOS. This is because the yabar repository has been archived upstream." + ) (mkRemovedOptionModule [ "security" "hideProcessInformation" ] '' The hidepid module was removed, since the underlying machinery is broken when using cgroups-v2. diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e27dce1734cec..b5ac575ad25cd 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1484,7 +1484,6 @@ in xss-lock = runTest ./xss-lock.nix; xterm = runTest ./xterm.nix; xxh = runTest ./xxh.nix; - yabar = runTest ./yabar.nix; yarr = runTest ./yarr.nix; ydotool = handleTest ./ydotool.nix { }; yggdrasil = runTest ./yggdrasil.nix; diff --git a/nixos/tests/yabar.nix b/nixos/tests/yabar.nix deleted file mode 100644 index 13a207f74829b..0000000000000 --- a/nixos/tests/yabar.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - name = "yabar"; - meta.maintainers = [ ]; - - nodes.machine = { - imports = [ - ./common/x11.nix - ./common/user-account.nix - ]; - - test-support.displayManager.auto.user = "bob"; - - programs.yabar.enable = true; - programs.yabar.bars = { - top.indicators.date.exec = "YABAR_DATE"; - }; - }; - - testScript = '' - machine.start() - machine.wait_for_x() - - # confirm proper startup - machine.wait_for_unit("yabar.service", "bob") - machine.sleep(10) - machine.wait_for_unit("yabar.service", "bob") - - machine.screenshot("top_bar") - ''; -} diff --git a/pkgs/applications/window-managers/yabar/build.nix b/pkgs/applications/window-managers/yabar/build.nix deleted file mode 100644 index b455b32fa7ae5..0000000000000 --- a/pkgs/applications/window-managers/yabar/build.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ - stdenv, - fetchFromGitHub, - cairo, - gdk-pixbuf, - libconfig, - pango, - pkg-config, - xcbutilwm, - alsa-lib, - wirelesstools, - asciidoc, - libxslt, - makeWrapper, - docbook_xsl, - configFile ? null, - lib, - rev, - sha256, - version, - patches ? [ ], -}: - -stdenv.mkDerivation { - pname = "yabar"; - inherit version; - - src = fetchFromGitHub { - inherit rev sha256; - - owner = "geommer"; - repo = "yabar"; - }; - - inherit patches; - - hardeningDisable = [ "format" ]; - - strictDeps = true; - depsBuildBuild = [ - pkg-config - ]; - nativeBuildInputs = [ - pkg-config - asciidoc - docbook_xsl - libxslt - makeWrapper - libconfig - pango - ]; - buildInputs = [ - cairo - gdk-pixbuf - libconfig - pango - xcbutilwm - alsa-lib - wirelesstools - ]; - - postPatch = '' - substituteInPlace ./Makefile \ - --replace "\$(shell git describe)" "${version}" \ - --replace "a2x" "a2x --no-xmllint" - ''; - - makeFlags = [ - "DESTDIR=$(out)" - "PREFIX=/" - ]; - - postInstall = '' - mkdir -p $out/share/yabar/examples - cp -v examples/*.config $out/share/yabar/examples - - ${lib.optionalString (configFile != null) '' - wrapProgram "$out/bin/yabar" \ - --add-flags "-c ${configFile}" - ''} - ''; - - #passthru.tests = { inherit (nixosTests) yabar; }; # nixos currently uses yabar-unstable - - meta = with lib; { - description = "Modern and lightweight status bar for X window managers"; - homepage = "https://github.com/geommer/yabar"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = [ ]; - mainProgram = "yabar"; - }; -} diff --git a/pkgs/applications/window-managers/yabar/default.nix b/pkgs/applications/window-managers/yabar/default.nix deleted file mode 100644 index 5a58d086340cb..0000000000000 --- a/pkgs/applications/window-managers/yabar/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - callPackage, - attrs ? { }, - fetchpatch, -}: - -let - overrides = rec { - version = "0.4.0"; - - rev = version; - sha256 = "1nw9dar1caqln5fr0dqk7dg6naazbpfwwzxwlkxz42shsc3w30a6"; - - patches = [ - (fetchpatch { - url = "https://github.com/geommer/yabar/commit/9779a5e04bd6e8cdc1c9fcf5d7ac31416af85a53.patch"; - sha256 = "1szhr3k1kq6ixgnp74wnzgfvgxm6r4zpc3ny2x2wzy6lh2czc07s"; - }) - ]; - - } // attrs; -in -callPackage ./build.nix overrides diff --git a/pkgs/applications/window-managers/yabar/unstable.nix b/pkgs/applications/window-managers/yabar/unstable.nix deleted file mode 100644 index 44998faaf6675..0000000000000 --- a/pkgs/applications/window-managers/yabar/unstable.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - fetchpatch, - playerctl, - libxkbcommon, - callPackage, - nixosTests, - attrs ? { }, -}: - -let - pkg = callPackage ./build.nix ( - { - version = "unstable-2018-01-18"; - - rev = "c516e8e78d39dd2b339acadc4c175347171150bb"; - sha256 = "1p9lx78cayyn7qc2q66id2xfs76jyddnqv2x1ypsvixaxwcvqgdb"; - } - // attrs - ); -in -pkg.overrideAttrs (o: { - buildInputs = o.buildInputs ++ [ - playerctl - libxkbcommon - ]; - - makeFlags = o.makeFlags ++ [ - "PLAYERCTL=1" - ]; - - patches = (o.patches or [ ]) ++ [ - (fetchpatch { - url = "https://github.com/geommer/yabar/commit/008dc1420ff684cf12ce2ef3ac9d642e054e39f5.patch"; - sha256 = "1q7nd66ai6nr2m6iqxn55gvbr4r5gjc00c8wyjc3riv31qcbqbhv"; - }) - ]; - - passthru = (o.passthru or { }) // { - tests = (o.passthru.tests or { }) // { - inherit (nixosTests) yabar; - }; - }; - -}) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6c89ae88276b8..8fa7bba5e41ee 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -2061,6 +2061,8 @@ mapAliases { yandex-browser-beta = throw "'yandex-browser-beta' has been removed, as it was broken and unmaintained"; # Added 2025-04-17 yandex-browser-corporate = throw "'yandex-browser-corporate' has been removed, as it was broken and unmaintained"; # Added 2025-04-17 youtrack_2022_3 = throw "'youtrack_2022_3' has been removed as it was deprecated. Please update to the 'youtrack' package."; # Added 2024-10-17 + yabar = throw "'yabar' has been removed as the upstream project was archived"; # Added 2025-06-10 + yabar-unstable = yabar; # Added 2025-06-10 yrd = throw "'yrd' has been removed, as it was broken and unmaintained"; # added 2024-05-27 yuzu-ea = throw "yuzu-ea has been removed from nixpkgs, as it has been taken down upstream"; # Added 2024-03-04 yuzu-early-access = throw "yuzu-early-access has been removed from nixpkgs, as it has been taken down upstream"; # Added 2024-03-04 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e2cf6be1b6ac0..6afa180e92c0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14668,10 +14668,6 @@ with pkgs; xygrib = libsForQt5.callPackage ../applications/misc/xygrib { }; - yabar = callPackage ../applications/window-managers/yabar { }; - - yabar-unstable = callPackage ../applications/window-managers/yabar/unstable.nix { }; - ydiff = with python3.pkgs; toPythonApplication ydiff; yokadi = python3Packages.callPackage ../applications/misc/yokadi { };