about summary refs log tree commit diff
path: root/users/Profpatsch/lorri-wait-for-eval/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-06-29T20·18+0200
committerProfpatsch <mail@profpatsch.de>2022-06-30T09·09+0000
commit8f55567cf209650ada83b3063faded0f6cdd40d7 (patch)
treecc1c7cb74f2180fd3f14940a96b07341779cd621 /users/Profpatsch/lorri-wait-for-eval/default.nix
parent6d99b93f1a45cff91f369dc7c53bdc724d68d092 (diff)
feat(users/Profpatsch): add lorri-wait-for-eval r/4265
A small exec wrapper which will query the lorri daemon for the last
few events, and if it sees a build running for the current
project (searching upwards for shell.nix), it will wait for the build
to finish before executing the command (in the new direnv
environment).

TODO: should patch lorri so that it can provide this information in a
better digestive format; right now it might have a later evaluation
running, so it’s hard to know which completion to wait for …

Change-Id: I8fa4a10484830a731fe3ec58f2694498f46a496c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5903
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/lorri-wait-for-eval/default.nix')
-rw-r--r--users/Profpatsch/lorri-wait-for-eval/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/users/Profpatsch/lorri-wait-for-eval/default.nix b/users/Profpatsch/lorri-wait-for-eval/default.nix
new file mode 100644
index 000000000000..af8135839a52
--- /dev/null
+++ b/users/Profpatsch/lorri-wait-for-eval/default.nix
@@ -0,0 +1,19 @@
+{ depot, pkgs, lib, ... }:
+
+let
+  lorri-wait-for-eval = pkgs.writers.writeHaskell "lorri-wait-for-eval"
+    {
+      libraries = [
+        pkgs.haskellPackages.async
+        pkgs.haskellPackages.aeson-better-errors
+        pkgs.haskellPackages.conduit-extra
+        pkgs.haskellPackages.error
+        pkgs.haskellPackages.PyF
+        pkgs.haskellPackages.unliftio
+      ];
+      ghcArgs = [ "-threaded" ];
+
+    } ./LorriWaitForEval.hs;
+
+in
+lorri-wait-for-eval