about summary refs log tree commit diff
path: root/users/Profpatsch/writers/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch/writers/default.nix')
-rw-r--r--users/Profpatsch/writers/default.nix12
1 files changed, 12 insertions, 0 deletions
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
     ;
 }