aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/programs/man/apropos.nix
blob: a8ec35ead92090fd53971033e8501f9478f0597a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ config, lib, pkgs, ... }:

with lib;

{
  config = {
    programs.man = {
      enable = true;
      generateCaches = true;
    };

    nmt.script = ''
      assertFileExists home-files/.manpath

      CACHE_DIR=$(cat $TESTED/home-files/.manpath | cut --delimiter=' ' --fields=3)

      if [[ ! -f "$CACHE_DIR/index.bt" ]]; then
          fail "Expected man cache files to exist (in $CACHE_DIR) but they were not found."
      fi
    '';
  };
}