diff options
author | tilpner <till@hoeppner.ws> | 2019-11-15 15:20:38 +0100 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2019-11-16 23:06:50 -0800 |
commit | 8150b587bd0e0efd97902275490b385e958746fa (patch) | |
tree | 5506347ed44a8e9e5e9a00fe9bef2c58971acb90 /pkgs/applications/networking/irc | |
parent | 08eb8dc3ebe430aed6e610efe08bf32f498bb123 (diff) |
weechatScripts.weechat-matrix: init at unstable-2019-11-10
Diffstat (limited to 'pkgs/applications/networking/irc')
-rw-r--r-- | pkgs/applications/networking/irc/weechat/scripts/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix | 58 |
2 files changed, 61 insertions, 1 deletions
diff --git a/pkgs/applications/networking/irc/weechat/scripts/default.nix b/pkgs/applications/networking/irc/weechat/scripts/default.nix index 81ee484f3b301..0880a32af92fe 100644 --- a/pkgs/applications/networking/irc/weechat/scripts/default.nix +++ b/pkgs/applications/networking/irc/weechat/scripts/default.nix @@ -1,10 +1,12 @@ -{ callPackage, luaPackages }: +{ callPackage, luaPackages, python3Packages }: { weechat-matrix-bridge = callPackage ./weechat-matrix-bridge { inherit (luaPackages) cjson luaffi; }; + weechat-matrix = python3Packages.callPackage ./weechat-matrix { }; + wee-slack = callPackage ./wee-slack { }; weechat-autosort = callPackage ./weechat-autosort { }; diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix new file mode 100644 index 0000000000000..ff6a7d9474119 --- /dev/null +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix @@ -0,0 +1,58 @@ +{ buildPythonPackage, stdenv, python, fetchFromGitHub, + pyopenssl, webcolors, future, atomicwrites, + attrs, Logbook, pygments, cachetools, matrix-nio }: + +let + matrixUploadPython = python.withPackages (ps: with ps; [ + magic + ]); +in buildPythonPackage { + pname = "weechat-matrix"; + version = "unstable-2019-11-10"; + + src = fetchFromGitHub { + owner = "poljar"; + repo = "weechat-matrix"; + rev = "69ad2a9c03d516c212d3d0700dbb2bfe654f6365"; + sha256 = "1mfbkag5np2lgv6f31nyfnvavyh67jrrx6gxhzb8m99dd43lgs8c"; + }; + + propagatedBuildInputs = [ + pyopenssl + webcolors + future + atomicwrites + attrs + Logbook + pygments + cachetools + matrix-nio + ]; + + passthru.scripts = [ "matrix.py" ]; + + dontBuild = true; + doCheck = false; + + installPhase = '' + mkdir -p $out/share $out/bin + cp $src/main.py $out/share/matrix.py + + cp $src/contrib/matrix_upload $out/bin/ + substituteInPlace $out/bin/matrix_upload \ + --replace '/usr/bin/env -S python3 -u' '${matrixUploadPython}/bin/python -u' + + mkdir -p $out/${python.sitePackages} + cp -r $src/matrix $out/${python.sitePackages}/matrix + ''; + + dontPatchShebangs = true; + + meta = with stdenv.lib; { + description = "A Python plugin for Weechat that lets Weechat communicate over the Matrix protocol"; + homepage = "https://github.com/poljar/weechat-matrix"; + license = licenses.isc; + platforms = platforms.linux; + maintainers = [ maintainers.tilpner ]; + }; +} |