about summary refs log tree commit diff
path: root/users/Profpatsch/whatcd-resolver/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2023-09-17T17·27+0200
committerclbot <clbot@tvl.fyi>2023-09-17T18·05+0000
commit3de96017640b6dc25f1544a1bafd4b370bb1cea0 (patch)
tree73b93f82139bc4109d19170d3e82351748f7ff7f /users/Profpatsch/whatcd-resolver/default.nix
parent07b0dff2099badc7dd7bc231175753e1556b8616 (diff)
feat(users/Profpatsch/whatcd-resolver): add executable r/6605
Change-Id: I28f5c26443b9a878f8f374af2c7935831d17ab12
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9355
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/whatcd-resolver/default.nix')
-rw-r--r--users/Profpatsch/whatcd-resolver/default.nix24
1 files changed, 23 insertions, 1 deletions
diff --git a/users/Profpatsch/whatcd-resolver/default.nix b/users/Profpatsch/whatcd-resolver/default.nix
index 17200ffe937b..d5de63c497aa 100644
--- a/users/Profpatsch/whatcd-resolver/default.nix
+++ b/users/Profpatsch/whatcd-resolver/default.nix
@@ -9,6 +9,7 @@ let
 
     src = depot.users.Profpatsch.exactSource ./. [
       ./whatcd-resolver.cabal
+      ./Main.hs
       ./src/WhatcdResolver.hs
     ];
 
@@ -43,5 +44,26 @@ let
     license = lib.licenses.mit;
   };
 
+  bins = depot.nix.getBins whatcd-resolver [ "whatcd-resolver" ];
+
 in
-whatcd-resolver
+
+depot.nix.writeExecline "whatcd-resolver-wrapped" { } [
+  "importas"
+  "-i"
+  "PATH"
+  "PATH"
+  "export"
+  "PATH"
+  "${pkgs.postgresql}/bin:$${PATH}"
+  "export"
+  "WHATCD_RESOLVER_TOOLS"
+  (pkgs.linkFarm "whatcd-resolver-tools" [
+    {
+      name = "pg_format";
+      path = "${pkgs.pgformatter}/bin/pg_format";
+    }
+  ])
+  bins.whatcd-resolver
+]
+