about summary refs log tree commit diff
path: root/pkgs/sternenseemann/default.nix
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-08 23:13:01 +0100
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-09 11:49:14 +0100
commit3601fa5464c7501719f23bfe56de5842a9e83b6c (patch)
treeef5f819492978e09aa6df6bdf469ac7234fccace /pkgs/sternenseemann/default.nix
parent85a6cdcd9270708e2ae88485cbf243b620c9cb0a (diff)
pkgs/sternenseemann/mandoc: init
Build mandoc from cvs and apply a patch which adds an exception for
the checks does makewhatis(8): with this the realpaths of man pages to
be indexed may be symlinks referring to files outside of the root man
directory if they are located in /nix/store.

This allows indexing /run/current-system/sw/share/man using mandoc's
makewhatis(8).

Since fetchcvs is currently broken in nixos-unstable we vendor in the
fixed variant from nixpkgs master until the channel has advanced.
Diffstat (limited to 'pkgs/sternenseemann/default.nix')
-rw-r--r--pkgs/sternenseemann/default.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/sternenseemann/default.nix b/pkgs/sternenseemann/default.nix
index a6e3a3bb..984afa5b 100644
--- a/pkgs/sternenseemann/default.nix
+++ b/pkgs/sternenseemann/default.nix
@@ -33,6 +33,10 @@ let
     };
   };
 
+  # temporarily vendor the fixed fetchcvs builder
+  # from nixpkgs master
+  fetchcvs = callPackage ./fetchcvs { };
+
 in
 
 lib.fix (self: {
@@ -42,6 +46,23 @@ lib.fix (self: {
 
   logbook = ocamlPackages.callPackage ./logbook { };
 
+  mandoc = pkgs.mandoc.overrideAttrs (old: rec {
+    src = fetchcvs {
+      sha256 = "19cqasw7fjsmhshs5khxrv8w3vdhf8xadls70l0gzqn7cyjmgsb9";
+      date = "2021-02-07";
+      cvsRoot = "anoncvs@mandoc.bsd.lv:/cvs";
+      module = "mandoc";
+    };
+    version = "unstable-${src.date}"; # actually early but idc
+    # fix makewhatis(1) skipping all man pages that
+    # are symlinks to /nix/store
+    patches = [ ./patches/mandoc-nix-store.patch ];
+    patchFlags = [ "-p0" ];
+    preConfigure = old.preConfigure + ''
+      echo NIXSTOREDIR="$(dirname "$out")" >> configure.local
+    '';
+  });
+
   pass = (pkgs.pass.override {
     waylandSupport = true;
     x11Support = false;