about summary refs log tree commit diff
path: root/users/Profpatsch/mailbox-org/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2023-01-08T22·49+0100
committerProfpatsch <mail@profpatsch.de>2023-01-08T23·10+0000
commit48686ca0d60e5be1d909ee9921ce66152367eb2d (patch)
tree8aae1e452fe66fd99c207e7e9f048ec6d70b5f65 /users/Profpatsch/mailbox-org/default.nix
parentcd40585ea4481625ed8c198ee56ce2e453a1cd9c (diff)
feat(users/Profpatsch/mailbox-org): Set up passing of sieve-test r/5633
Implement a parser for tools, and instantiate once for
arglib-netencode arguments (parsed by the new netencode parser) and
one just from the PATH for testing from the repl.

Change-Id: Id0cf264100123a87700880c7230d68426224fd0d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7798
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/Profpatsch/mailbox-org/default.nix')
-rw-r--r--users/Profpatsch/mailbox-org/default.nix30
1 files changed, 19 insertions, 11 deletions
diff --git a/users/Profpatsch/mailbox-org/default.nix b/users/Profpatsch/mailbox-org/default.nix
index 217fd498e5cc..99b9d45b7d6a 100644
--- a/users/Profpatsch/mailbox-org/default.nix
+++ b/users/Profpatsch/mailbox-org/default.nix
@@ -2,18 +2,26 @@
 
 let
 
-  cas-serve = depot.users.Profpatsch.writers.writeHaskellInteractive "mailbox-org"
-    {
-      libraries = [
-        depot.users.Profpatsch.my-prelude
-        depot.users.Profpatsch.execline.exec-helpers-hs
-        pkgs.haskellPackages.aeson
-        pkgs.haskellPackages.http-conduit
-        pkgs.haskellPackages.aeson-better-errors
+  cas-serve =
+    lib.pipe ./MailboxOrg.hs [
+      (depot.users.Profpatsch.writers.writeHaskellInteractive "mailbox-org"
+        {
+          libraries = [
+            depot.users.Profpatsch.my-prelude
+            depot.users.Profpatsch.execline.exec-helpers-hs
+            depot.users.Profpatsch.arglib.netencode.haskell
+            pkgs.haskellPackages.aeson
+            pkgs.haskellPackages.http-conduit
+            pkgs.haskellPackages.aeson-better-errors
+
+          ];
+          ghcArgs = [ "-threaded" ];
+        })
+      (depot.users.Profpatsch.arglib.netencode.with-args {
+        BINS = depot.nix.getBins pkgs.dovecot_pigeonhole [ "sieve-test" ];
+      })
+    ];
 
-      ];
-      ghcArgs = [ "-threaded" ];
-    } ./MailboxOrg.hs;
 
 in
 cas-serve