blob: 160dcc75c36f149ad67877e78a1641aaf65c2c9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{ pkgs ? (import <nixpkgs> {})
, compilerName ? "ghc801"
}:
rec {
# haskellPackages = pkgs.haskell.packages."${compilerName}";
haskellPackages = pkgs.haskell.packages."${compilerName}".override {
overrides = self: super: {
Shellac = pkgs.haskell.lib.appendPatch super.Shellac (pkgs.writeText "build.patch" ''
From 20e394aa3ea287fcaacde9c076c9f49929b28ece Mon Sep 17 00:00:00 2001
From: Gregor Kleen <gkleen@yggdrasil.li>
Date: Sat, 11 Jun 2016 22:06:36 +0200
Subject: [PATCH] Allow modification of state in beforePrompt
---
src/System/Console/Shell/RunShell.hs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/System/Console/Shell/RunShell.hs b/src/System/Console/Shell/RunShell.hs
index 79ffb54..3e0b95b 100644
--- a/src/System/Console/Shell/RunShell.hs
+++ b/src/System/Console/Shell/RunShell.hs
@@ -217,9 +217,11 @@ shellLoop desc backend iss = loop
bst = backendState iss
loop st = do
- flushOutput backend bst
+ flushOutput backend bst
+
+ runSh st (outputString backend bst) (beforePrompt desc) >>= loop' . fst
- runSh st (outputString backend bst) (beforePrompt desc)
+ loop' st = do
setAttemptedCompletionFunction backend bst
(completionFunction desc backend bst st)
--
2.8.3
'');
};
};
sequence = haskellPackages.callPackage ./sequence.nix {};
}
|