From c1451ffcbc021e4f25721541538173f24be8f3cc Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 24 Feb 2016 04:16:06 +0000 Subject: Incorporated: Switched to using location.host 480675cba32803ab74ec064e14ed6b2001c8e071 --- default.nix | 3 ++- threepenny.patch | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 threepenny.patch diff --git a/default.nix b/default.nix index 9800293..75953c6 100644 --- a/default.nix +++ b/default.nix @@ -4,6 +4,7 @@ rec { haskellPackages = pkgs.haskell.packages."${compilerName}"; + threepenny-gui = pkgs.haskell.lib.appendPatch haskellPackages.threepenny-gui ./threepenny.patch; thermoprint-spec = haskellPackages.callPackage ./spec/thermoprint-spec.nix {}; thermoprint-bbcode = haskellPackages.callPackage ./tp-bbcode/thermoprint-bbcode.nix { inherit bbcode thermoprint-spec; @@ -18,7 +19,7 @@ rec { }; }; thermoprint-webgui = haskellPackages.callPackage ./webgui/thermoprint-webgui.nix { - inherit thermoprint-bbcode thermoprint-client; + inherit thermoprint-bbcode thermoprint-client threepenny-gui; }; bbcode = haskellPackages.callPackage ./bbcode/bbcode.nix {}; } diff --git a/threepenny.patch b/threepenny.patch new file mode 100644 index 0000000..8420021 --- /dev/null +++ b/threepenny.patch @@ -0,0 +1,25 @@ +From 480675cba32803ab74ec064e14ed6b2001c8e071 Mon Sep 17 00:00:00 2001 +From: Gregor Kleen +Date: Tue, 23 Feb 2016 18:14:48 +0000 +Subject: [PATCH] Switched to using location.host + +--- + js/comm.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/comm.js b/js/comm.js +index 2d24f08..01763ba 100644 +--- a/js/comm.js ++++ b/js/comm.js +@@ -14,7 +14,7 @@ + ********************************************************************* */ + Haskell.createWebSocket = function (url0, receive) { + var that = {}; +- var url = 'ws:' + url0.slice(5) + 'websocket'; ++ var url = 'ws://' + location.host + '/websocket'; + var ws = new WebSocket(url); + + // Close WebSocket when the browser window is closed. +-- +2.7.0 + -- cgit v1.2.3