depot/third_party/home-manager/tests/modules/programs/man/apropos.nix
Default email 72904c318c Project import generated by Copybara.
GitOrigin-RevId: 9bf1f40af124573a54fd208b1f539eb694ef31a6
2020-10-11 17:22:58 -07:00

22 lines
447 B
Nix

{ 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
'';
};
}