about summary refs log tree commit diff
path: root/users/Profpatsch
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch')
-rw-r--r--users/Profpatsch/mailbox-org/default.nix3
-rw-r--r--users/Profpatsch/writers/default.nix12
2 files changed, 14 insertions, 1 deletions
diff --git a/users/Profpatsch/mailbox-org/default.nix b/users/Profpatsch/mailbox-org/default.nix
index bb8082bd4c80..217fd498e5cc 100644
--- a/users/Profpatsch/mailbox-org/default.nix
+++ b/users/Profpatsch/mailbox-org/default.nix
@@ -1,7 +1,8 @@
 { depot, pkgs, lib, ... }:
 
 let
-  cas-serve = pkgs.writers.writeHaskell "mailbox-org"
+
+  cas-serve = depot.users.Profpatsch.writers.writeHaskellInteractive "mailbox-org"
     {
       libraries = [
         depot.users.Profpatsch.my-prelude
diff --git a/users/Profpatsch/writers/default.nix b/users/Profpatsch/writers/default.nix
index 0e8ad9635662..9fb69231a143 100644
--- a/users/Profpatsch/writers/default.nix
+++ b/users/Profpatsch/writers/default.nix
@@ -99,10 +99,22 @@ let
     };
 
 
+  ghcBins = libraries: depot.nix.getBins (pkgs.ghc.withPackages (_: libraries)) [ "runghc" ];
+
+  writeHaskellInteractive = name: { libraries, ghcArgs ? [ ] }: path:
+    depot.nix.writeExecline name { } ([
+      (ghcBins libraries).runghc
+      "--"
+    ] ++ ghcArgs ++ [
+      "--"
+      path
+    ]);
+
 in
 {
   inherit
     python3
     python3Lib
+    writeHaskellInteractive
     ;
 }