aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-02-24 04:16:06 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-02-24 04:16:06 +0000
commitc1451ffcbc021e4f25721541538173f24be8f3cc (patch)
tree232463360841f4b4aab46b44ea240dbd9ca0744f
parenta3c18a40502ce7a806216425cfde8200df5ce12e (diff)
downloadthermoprint-c1451ffcbc021e4f25721541538173f24be8f3cc.tar
thermoprint-c1451ffcbc021e4f25721541538173f24be8f3cc.tar.gz
thermoprint-c1451ffcbc021e4f25721541538173f24be8f3cc.tar.bz2
thermoprint-c1451ffcbc021e4f25721541538173f24be8f3cc.tar.xz
thermoprint-c1451ffcbc021e4f25721541538173f24be8f3cc.zip
Incorporated: Switched to using location.host
480675cba32803ab74ec064e14ed6b2001c8e071
-rw-r--r--default.nix3
-rw-r--r--threepenny.patch25
2 files changed, 27 insertions, 1 deletions
diff --git a/default.nix b/default.nix
index 9800293..75953c6 100644
--- a/default.nix
+++ b/default.nix
@@ -4,6 +4,7 @@
4 4
5rec { 5rec {
6 haskellPackages = pkgs.haskell.packages."${compilerName}"; 6 haskellPackages = pkgs.haskell.packages."${compilerName}";
7 threepenny-gui = pkgs.haskell.lib.appendPatch haskellPackages.threepenny-gui ./threepenny.patch;
7 thermoprint-spec = haskellPackages.callPackage ./spec/thermoprint-spec.nix {}; 8 thermoprint-spec = haskellPackages.callPackage ./spec/thermoprint-spec.nix {};
8 thermoprint-bbcode = haskellPackages.callPackage ./tp-bbcode/thermoprint-bbcode.nix { 9 thermoprint-bbcode = haskellPackages.callPackage ./tp-bbcode/thermoprint-bbcode.nix {
9 inherit bbcode thermoprint-spec; 10 inherit bbcode thermoprint-spec;
@@ -18,7 +19,7 @@ rec {
18 }; 19 };
19 }; 20 };
20 thermoprint-webgui = haskellPackages.callPackage ./webgui/thermoprint-webgui.nix { 21 thermoprint-webgui = haskellPackages.callPackage ./webgui/thermoprint-webgui.nix {
21 inherit thermoprint-bbcode thermoprint-client; 22 inherit thermoprint-bbcode thermoprint-client threepenny-gui;
22 }; 23 };
23 bbcode = haskellPackages.callPackage ./bbcode/bbcode.nix {}; 24 bbcode = haskellPackages.callPackage ./bbcode/bbcode.nix {};
24} 25}
diff --git a/threepenny.patch b/threepenny.patch
new file mode 100644
index 0000000..8420021
--- /dev/null
+++ b/threepenny.patch
@@ -0,0 +1,25 @@
1From 480675cba32803ab74ec064e14ed6b2001c8e071 Mon Sep 17 00:00:00 2001
2From: Gregor Kleen <aethoago@141.li>
3Date: Tue, 23 Feb 2016 18:14:48 +0000
4Subject: [PATCH] Switched to using location.host
5
6---
7 js/comm.js | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10diff --git a/js/comm.js b/js/comm.js
11index 2d24f08..01763ba 100644
12--- a/js/comm.js
13+++ b/js/comm.js
14@@ -14,7 +14,7 @@
15 ********************************************************************* */
16 Haskell.createWebSocket = function (url0, receive) {
17 var that = {};
18- var url = 'ws:' + url0.slice(5) + 'websocket';
19+ var url = 'ws://' + location.host + '/websocket';
20 var ws = new WebSocket(url);
21
22 // Close WebSocket when the browser window is closed.
23--
242.7.0
25