diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-02-08 23:13:01 +0100 |
---|---|---|
committer | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-02-09 11:49:14 +0100 |
commit | 3601fa5464c7501719f23bfe56de5842a9e83b6c (patch) | |
tree | ef5f819492978e09aa6df6bdf469ac7234fccace /pkgs/sternenseemann/fetchcvs | |
parent | 85a6cdcd9270708e2ae88485cbf243b620c9cb0a (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/fetchcvs')
-rw-r--r-- | pkgs/sternenseemann/fetchcvs/builder.sh | 27 | ||||
-rw-r--r-- | pkgs/sternenseemann/fetchcvs/default.nix | 20 |
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/sternenseemann/fetchcvs/builder.sh b/pkgs/sternenseemann/fetchcvs/builder.sh new file mode 100644 index 00000000..fe1019aa --- /dev/null +++ b/pkgs/sternenseemann/fetchcvs/builder.sh @@ -0,0 +1,27 @@ +source $stdenv/setup + +(echo "#!$SHELL"; \ + echo 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@"') > ssh +chmod +x ssh +export CVS_RSH=$PWD/ssh + +# creating the export drictory and checking out there only to be able to +# move the content without the root directory into $out ... +# cvs -f -d "$url" export $tag -d "$out" "$module" +# should work (but didn't - got no response on #cvs) +# See als man Page for those options + +mkdir -p export +if [ -n "$tag" ]; then + tag="-r $tag" +else + if [ -n "$date" ]; then + tag="-D $date" + else + tag="-D NOW" + fi +fi +(cd export && cvs -f -z0 -d "$cvsRoot" export $tag "$module") +mv export/* $out + +stopNest diff --git a/pkgs/sternenseemann/fetchcvs/default.nix b/pkgs/sternenseemann/fetchcvs/default.nix new file mode 100644 index 00000000..1f7947d4 --- /dev/null +++ b/pkgs/sternenseemann/fetchcvs/default.nix @@ -0,0 +1,20 @@ +# example tags: +# date="2007-20-10"; (get the last version before given date) +# tag="<tagname>" (get version by tag name) +# If you don't specify neither one date="NOW" will be used (get latest) + +{stdenvNoCC, cvs, openssh}: + +{cvsRoot, module, tag ? null, date ? null, sha256}: + +stdenvNoCC.mkDerivation { + name = "cvs-export"; + builder = ./builder.sh; + nativeBuildInputs = [cvs openssh]; + + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = sha256; + + inherit cvsRoot module sha256 tag date; +} |