about summary refs log tree commit diff
path: root/pkgs/profpatsch/default.nix
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-12 14:05:56 +0100
committersternenseemann <sternenseemann@systemli.org>2021-02-25 19:52:33 +0100
commitcbef421081f1e65b1dcd81c9a6434e69cbc50f8e (patch)
tree64d8bb5209903dc803e5c12c328524c1f7cf64a0 /pkgs/profpatsch/default.nix
parent9f11b3333709364c15a60c38fee9b655728b6c93 (diff)
pkgs/profpatsch/nman: initial rewrite in rust
This is a complete and user interface compatible rewrite of nman.go in
Rust which aleviates a few flaws of the previous implementation:

* Garbage collector roots for both the derivation and the build outputs
  are created in a temporary directory which is cleaned afterwards. This
  prevents a race condition between nman and nix-store --gc and doesn't
  pollute the user's working directory.
* Instead of building just one build output, nman now checks every
  output for the requested man page which fixes nman for derivations
  which have their man pages split between multiple outputs, e. g. man
  and devman.

Future work:

* Improve error messages reported to the user
* Man page
* Implement man page search heuristics if no section is specified:
  Instead of falling back to section 1, all sections should be checked
  for the desired page (in an ascending order?)
Diffstat (limited to 'pkgs/profpatsch/default.nix')
-rw-r--r--pkgs/profpatsch/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/profpatsch/default.nix b/pkgs/profpatsch/default.nix
index 063b3acc..0fd31aeb 100644
--- a/pkgs/profpatsch/default.nix
+++ b/pkgs/profpatsch/default.nix
@@ -127,7 +127,9 @@ in rec {
   display-infos = callPackage ./display-infos { inherit sfttime; };
   git-commit-index = callPackage ./git-commit-index { inherit script; };
   nix-http-serve = callPackage ./nix-http-serve {};
-  nman = callPackage ./nman {};
+  nman = callPackage ./nman {
+    inherit writeRustSimpleBin;
+  };
   sfttime = callPackage ./sfttime {};
   show-qr-code = callPackage ./show-qr-code {};
   warpspeed = callPackage ./warpspeed {
@@ -164,6 +166,7 @@ in rec {
 
   inherit (import ./write-rust.nix { inherit pkgs runExeclineLocal getBins drvSeqL; })
     writeRustSimple
+    writeRustSimpleBin
     writeRustSimpleLib
     testRustSimple
     ;