diff options
author | Linus Heckemann <git@sphalerite.org> | 2018-11-30 15:46:10 +0100 |
---|---|---|
committer | Linus Heckemann <git@sphalerite.org> | 2018-12-05 12:12:42 +0100 |
commit | 9504292b1e9948fb286b1b1cdbe83f66b367b64d (patch) | |
tree | 5c569c87d8ad0186baf3fe45315219b0f1f73ea6 /pkgs/applications/networking/irc | |
parent | 8887e1f697d9e13ad277ca7d7054bc42c2459548 (diff) | |
parent | 76c7a8bac083522ea10ba43f699421ca64007708 (diff) | |
download | nixlib-9504292b1e9948fb286b1b1cdbe83f66b367b64d.tar nixlib-9504292b1e9948fb286b1b1cdbe83f66b367b64d.tar.gz nixlib-9504292b1e9948fb286b1b1cdbe83f66b367b64d.tar.bz2 nixlib-9504292b1e9948fb286b1b1cdbe83f66b367b64d.tar.lz nixlib-9504292b1e9948fb286b1b1cdbe83f66b367b64d.tar.xz nixlib-9504292b1e9948fb286b1b1cdbe83f66b367b64d.tar.zst nixlib-9504292b1e9948fb286b1b1cdbe83f66b367b64d.zip |
Merge remote-tracking branch 'origin/master' into weechat-unwrapped
Diffstat (limited to 'pkgs/applications/networking/irc')
10 files changed, 203 insertions, 15 deletions
diff --git a/pkgs/applications/networking/irc/irssi/default.nix b/pkgs/applications/networking/irc/irssi/default.nix index b5bab3585c5f..ff80df6523cb 100644 --- a/pkgs/applications/networking/irc/irssi/default.nix +++ b/pkgs/applications/networking/irc/irssi/default.nix @@ -24,5 +24,6 @@ stdenv.mkDerivation rec { description = "A terminal based IRC client"; platforms = stdenv.lib.platforms.unix; maintainers = with stdenv.lib.maintainers; [ lovek323 ]; + license = stdenv.lib.licenses.gpl2Plus; }; } diff --git a/pkgs/applications/networking/irc/konversation/default.nix b/pkgs/applications/networking/irc/konversation/default.nix index c41b6116b29d..ccee78a64da6 100644 --- a/pkgs/applications/networking/irc/konversation/default.nix +++ b/pkgs/applications/networking/irc/konversation/default.nix @@ -30,13 +30,13 @@ let pname = "konversation"; - version = "1.7.4"; + version = "1.7.5"; in mkDerivation rec { name = "${pname}-${version}"; src = fetchurl { url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz"; - sha256 = "0y4rj4fcl1wsi3y1fhnzad9nf4llwrnipfm9mfm55kqnx1zmpvqp"; + sha256 = "0h098yhlp36ls6pdvs2r93ig8dv4fys62m0h6wxccprb0qrpbgv0"; }; buildInputs = [ @@ -70,13 +70,6 @@ in mkDerivation rec { kdoctools ]; - patches = [ - (fetchpatch { - url = "https://cgit.kde.org/konversation.git/patch/?id=20018b3d0798421c9cb8a9d983e5a5b34bd88e8d"; - sha256 = "0y5m5zimfhc0d1xnkzs05c8ig11lhwdn04fk76vi7966hx8wggnn"; - }) - ]; - meta = { description = "Integrated IRC client for KDE"; license = with lib.licenses; [ gpl2 ]; diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 82f9e28a13cc..d52d8b6b31e4 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -5,11 +5,12 @@ , asciidoctor # manpages , guileSupport ? true, guile , luaSupport ? true, lua5 -, perlSupport ? true, perl +, perlSupport ? true, perl, perlPackages , pythonSupport ? true, pythonPackages , rubySupport ? true, ruby , tclSupport ? true, tcl -, extraBuildInputs ? [] }: +, extraBuildInputs ? [] +}: let inherit (pythonPackages) python; @@ -26,12 +27,12 @@ let in assert lib.all (p: p.enabled -> ! (builtins.elem null p.buildInputs)) plugins; stdenv.mkDerivation rec { - version = "2.1"; + version = "2.3"; name = "weechat-${version}"; src = fetchurl { - url = "http://weechat.org/files/src/weechat-${version}.tar.bz2"; - sha256 = "0fq68wgynv2c3319gmzi0lz4ln4yrrk755y5mbrlr7fc1sx7ffd8"; + url = "https://weechat.org/files/src/weechat-${version}.tar.bz2"; + sha256 = "0mi4pfnyny0vqc35r0scn6yy21y790a5iwq8ms7kch7b7z11jn9w"; }; outputs = [ "out" "man" ] ++ map (p: p.name) enabledPlugins; @@ -75,7 +76,7 @@ let on https://nixos.org/nixpkgs/manual/#sec-weechat . ''; license = stdenv.lib.licenses.gpl3; - maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny lheckemann ]; + maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny lheckemann ma27 ]; platforms = stdenv.lib.platforms.unix; }; } diff --git a/pkgs/applications/networking/irc/weechat/scripts/default.nix b/pkgs/applications/networking/irc/weechat/scripts/default.nix new file mode 100644 index 000000000000..6324e8ec88cd --- /dev/null +++ b/pkgs/applications/networking/irc/weechat/scripts/default.nix @@ -0,0 +1,15 @@ +{ callPackage, luaPackages, pythonPackages }: + +{ + weechat-xmpp = callPackage ./weechat-xmpp { + inherit (pythonPackages) pydns; + }; + + weechat-matrix-bridge = callPackage ./weechat-matrix-bridge { + inherit (luaPackages) cjson; + }; + + wee-slack = callPackage ./wee-slack { + inherit pythonPackages; + }; +} diff --git a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix new file mode 100644 index 000000000000..280e447cd0a1 --- /dev/null +++ b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix @@ -0,0 +1,39 @@ +{ stdenv, substituteAll, buildEnv, fetchFromGitHub, pythonPackages }: + +stdenv.mkDerivation rec { + name = "wee-slack-${version}"; + version = "2.2.0"; + + src = fetchFromGitHub { + repo = "wee-slack"; + owner = "wee-slack"; + rev = "v${version}"; + sha256 = "1iy70q630cgs7fvk2151fq9519dwxrlqq862sbrwypzr6na6yqpg"; + }; + + patches = [ + (substituteAll { + src = ./libpath.patch; + env = "${buildEnv { + name = "wee-slack-env"; + paths = with pythonPackages; [ websocket_client six ]; + }}/${pythonPackages.python.sitePackages}"; + }) + ]; + + passthru.scripts = [ "wee_slack.py" ]; + + installPhase = '' + mkdir -p $out/share + cp wee_slack.py $out/share/wee_slack.py + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/wee-slack/wee-slack; + license = licenses.mit; + maintainers = with maintainers; [ ma27 ]; + description = '' + A WeeChat plugin for Slack.com. Synchronizes read markers, provides typing notification, search, etc.. + ''; + }; +} diff --git a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/libpath.patch b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/libpath.patch new file mode 100644 index 000000000000..8887e075f13c --- /dev/null +++ b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/libpath.patch @@ -0,0 +1,13 @@ +diff --git a/wee_slack.py b/wee_slack.py +index c5c7bc6..23fef2f 100644 +--- a/wee_slack.py ++++ b/wee_slack.py +@@ -25,6 +25,8 @@ try: + except: + from StringIO import StringIO + ++sys.path.append('@env@') ++ + from websocket import create_connection, WebSocketConnectionClosedException + + # hack to make tests possible.. better way? 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 new file mode 100644 index 000000000000..d2960ae93a99 --- /dev/null +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix @@ -0,0 +1,46 @@ +{ stdenv, curl, fetchFromGitHub, cjson, olm, luaffi }: + +stdenv.mkDerivation { + name = "weechat-matrix-bridge-2018-05-29"; + src = fetchFromGitHub { + owner = "torhve"; + repo = "weechat-matrix-protocol-script"; + rev = "ace3fefc0e35a627f8a528032df2e3111e41eb1b"; + sha256 = "1snf8vn5n9wzrnqnvdrcli4199s5p114jbjlgrj5c27i53173wqw"; + }; + + 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/5.2/cjson.so $out/lib/cjson.so + cp ${olm}/lib/libolm.so $out/lib/libolm.so + cp ${luaffi}/lib/ffi.so $out/lib/ffi.so + ''; + + meta = with stdenv.lib; { + description = "A WeeChat script in Lua that implements the matrix.org chat protocol"; + homepage = https://github.com/torhve/weechat-matrix-protocol-script; + maintainers = with maintainers; [ ma27 ]; + license = licenses.mit; # see https://github.com/torhve/weechat-matrix-protocol-script/blob/0052e7275ae149dc5241226391c9b1889ecc3c6b/matrix.lua#L53 + platforms = platforms.unix; + }; +} 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 new file mode 100644 index 000000000000..d9945c2993b7 --- /dev/null +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/library-path.patch @@ -0,0 +1,28 @@ +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[[ diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-xmpp/default.nix b/pkgs/applications/networking/irc/weechat/scripts/weechat-xmpp/default.nix new file mode 100644 index 000000000000..dad5b9c5e02a --- /dev/null +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-xmpp/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, xmpppy, pydns, substituteAll, buildEnv }: + +stdenv.mkDerivation { + name = "weechat-jabber-2017-08-30"; + + src = fetchFromGitHub { + repo = "weechat-xmpp"; + owner = "sleduc"; + sha256 = "0s02xs0ynld9cxxzj07al364sfglyc5ir1i82133mq0s8cpphnxv"; + rev = "8f6c21f5a160c9318c7a2d8fd5dcac7ab2e0d843"; + }; + + installPhase = '' + mkdir -p $out/share + cp jabber.py $out/share/jabber.py + ''; + + patches = [ + (substituteAll { + src = ./libpath.patch; + env = "${buildEnv { + name = "weechat-xmpp-env"; + paths = [ pydns xmpppy ]; + }}/lib/python2.7/site-packages"; + }) + ]; + + passthru.scripts = [ "jabber.py" ]; + + meta = with stdenv.lib; { + description = "A fork of the jabber plugin for weechat"; + homepage = "https://github.com/sleduc/weechat-xmpp"; + maintainers = with maintainers; [ ma27 ]; + license = licenses.gpl3Plus; + }; +} diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-xmpp/libpath.patch b/pkgs/applications/networking/irc/weechat/scripts/weechat-xmpp/libpath.patch new file mode 100644 index 000000000000..372c83944a27 --- /dev/null +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-xmpp/libpath.patch @@ -0,0 +1,16 @@ +diff --git a/jabber.py b/jabber.py +index 27006a3..e53c2c0 100644 +--- a/jabber.py ++++ b/jabber.py +@@ -95,6 +95,11 @@ SCRIPT_COMMAND = SCRIPT_NAME + import re + import warnings + ++import sys ++ ++sys.path.append('@env@') ++ ++ + import_ok = True + + try: |