summary refs log tree commit diff
path: root/nixos/modules/programs/yabar.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-09-20 12:47:46 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-09-20 12:47:46 +0200
commit8b58a7187c9f3c8f1997f328c27c536effccdac3 (patch)
treea41c3c899244509ff527850627aaa7d1f9fbbbe6 /nixos/modules/programs/yabar.nix
parentc6d02602390130ef897c03a4b6c5060000e72ea8 (diff)
downloadnixpkgs-8b58a7187c9f3c8f1997f328c27c536effccdac3.tar
nixpkgs-8b58a7187c9f3c8f1997f328c27c536effccdac3.tar.gz
nixpkgs-8b58a7187c9f3c8f1997f328c27c536effccdac3.tar.bz2
nixpkgs-8b58a7187c9f3c8f1997f328c27c536effccdac3.tar.lz
nixpkgs-8b58a7187c9f3c8f1997f328c27c536effccdac3.tar.xz
nixpkgs-8b58a7187c9f3c8f1997f328c27c536effccdac3.tar.zst
nixpkgs-8b58a7187c9f3c8f1997f328c27c536effccdac3.zip
nixos/yabar: fix module & test (#46954)
The `pkgs.yabar` package is relatively old (2016-04) and contains
several issues fixed on master. `yabar-unstable` containsa recent master
build with several fixes and a lot of new features (I use
`yabar-unstable` for some time now and had no issues with it).

In the upstream bugtracker some bugs could be fixed on ArchLinux by
simply installing `yabar-git` (an AUR package which builds a recent
master).

To stabilize the module, the option `programs.yabar.package` now
defaults to `pkgs.yabar-unstable` and yields a warning with several
linked issues that are known on `pkgs.yabar`.

The test has been refactored as well to ensure that `yabar` actually
starts (and avoid non-deterministic random success) and takes a
screenshot of a very minimalistic configuration on IceWM.

Fixes #46899
Diffstat (limited to 'nixos/modules/programs/yabar.nix')
-rw-r--r--nixos/modules/programs/yabar.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/nixos/modules/programs/yabar.nix b/nixos/modules/programs/yabar.nix
index a01083c3ace..db085211366 100644
--- a/nixos/modules/programs/yabar.nix
+++ b/nixos/modules/programs/yabar.nix
@@ -44,10 +44,23 @@ in
       enable = mkEnableOption "yabar";
 
       package = mkOption {
-        default = pkgs.yabar;
-        example = literalExample "pkgs.yabar-unstable";
+        default = pkgs.yabar-unstable;
+        example = literalExample "pkgs.yabar";
         type = types.package;
 
+        # `yabar-stable` segfaults under certain conditions.
+        apply = x: if x == pkgs.yabar-unstable then x else flip 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.