about summary refs log tree commit diff
path: root/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge')
-rw-r--r--pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix51
-rw-r--r--pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/library-path.patch28
2 files changed, 0 insertions, 79 deletions
diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix
deleted file mode 100644
index 46cb08594ee0..000000000000
--- a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{ lib, stdenv, curl, fetchFromGitHub, cjson, olm, luaffi }:
-
-stdenv.mkDerivation {
-  pname = "weechat-matrix-bridge";
-  version = "unstable-2018-11-19";
-  src = fetchFromGitHub {
-    owner = "torhve";
-    repo = "weechat-matrix-protocol-script";
-    rev = "8d32e90d864a8f3f09ecc2857cd5dd6e39a8c3f7";
-    sha256 = "0qqd6qmkrdc0r3rnl53c3yp93fbcz7d3mdw3vq5gmdqxyym4s9lj";
-  };
-
-  patches = [
-    ./library-path.patch
-  ];
-
-  buildInputs = [ curl cjson olm luaffi ];
-
-  postPatch = ''
-    substituteInPlace matrix.lua \
-      --replace "/usr/bin/curl" "${curl}/bin/curl" \
-      --replace "__NIX_LIB_PATH__" "$out/lib/?.so" \
-      --replace "__NIX_OLM_PATH__" "$out/share/?.lua"
-
-    substituteInPlace olm.lua \
-      --replace "__NIX_LIB_PATH__" "$out/lib/?.so"
-  '';
-
-  passthru.scripts = [ "matrix.lua" ];
-
-  installPhase = ''
-    mkdir -p $out/{share,lib}
-
-    cp {matrix.lua,olm.lua} $out/share
-    cp ${cjson}/lib/lua/${cjson.lua.luaversion}/cjson.so $out/lib/cjson.so
-    cp ${olm}/lib/libolm.so $out/lib/libolm.so
-    cp ${luaffi}/lib/lua/${luaffi.lua.luaversion}/ffi.so $out/lib/ffi.so
-  '';
-
-  meta = with lib; {
-    description = "WeeChat script in Lua that implements the matrix.org chat protocol";
-    homepage = "https://github.com/torhve/weechat-matrix-protocol-script";
-    maintainers = with maintainers; [ ];
-    license = licenses.mit; # see https://github.com/torhve/weechat-matrix-protocol-script/blob/0052e7275ae149dc5241226391c9b1889ecc3c6b/matrix.lua#L53
-    platforms = platforms.unix;
-
-    # As of 2019-06-30, all of the dependencies are available on macOS but the
-    # package itself does not build.
-    broken = stdenv.isDarwin;
-  };
-}
diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/library-path.patch b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/library-path.patch
deleted file mode 100644
index d9945c2993b7..000000000000
--- a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/library-path.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/matrix.lua b/matrix.lua
-index b79f500..32b37a2 100644
---- a/matrix.lua
-+++ b/matrix.lua
-@@ -43,6 +43,9 @@ This script maps this as follows:
- 
- ]]
- 
-+package.cpath = package.cpath .. ";__NIX_LIB_PATH__"
-+package.path = package.path .. ";__NIX_OLM_PATH__"
-+
- local json = require 'cjson' -- apt-get install lua-cjson
- local olmstatus, olm = pcall(require, 'olm') -- LuaJIT olm FFI binding ln -s ~/olm/olm.lua /usr/local/share/lua/5.1
- local w = weechat
-diff --git a/olm.lua b/olm.lua
-index 114649c..4828371 100644
---- a/olm.lua
-+++ b/olm.lua
-@@ -17,6 +17,9 @@
-  * limitations under the License.
-  */
- --]]
-+
-+package.cpath = package.cpath .. ";__NIX_LIB_PATH__"
-+
- local ffi = require'ffi'
- 
- ffi.cdef[[