From 4cf470c97cd9d78c31610fdf0806e402a3ffb667 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 24 Dec 2023 18:39:37 +0100 Subject: [PATCH] nixos/mandoc: don't create leading double slashes in MANPATH --- nixos/modules/misc/mandoc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/misc/mandoc.nix b/nixos/modules/misc/mandoc.nix index e24ddc6bdd9d..73646a60aabb 100644 --- a/nixos/modules/misc/mandoc.nix +++ b/nixos/modules/misc/mandoc.nix @@ -190,7 +190,7 @@ in ''; # tell mandoc the paths containing man pages - profileRelativeSessionVariables."MANPATH" = map (path: "/${path}") cfg.manPath; + profileRelativeSessionVariables."MANPATH" = map (path: if builtins.substring 0 1 path != "/" then "/${path}" else path) cfg.manPath; }; }; }