From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qL8qJ2CqfWGDTQAAgWs5BA (envelope-from ) for ; Sat, 30 Oct 2021 22:26:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EC2qImCqfWG2RgAAbx9fmQ (envelope-from ) for ; Sat, 30 Oct 2021 20:26:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 44DB2F38B for ; Sat, 30 Oct 2021 22:26:08 +0200 (CEST) Received: from localhost ([::1]:38094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mguvX-0001WH-CB for larch@yhetil.org; Sat, 30 Oct 2021 16:26:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mguvS-0001UC-Gv for guix-patches@gnu.org; Sat, 30 Oct 2021 16:26:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mguvS-0005eF-8q for guix-patches@gnu.org; Sat, 30 Oct 2021 16:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mguvS-0001DV-6D for guix-patches@gnu.org; Sat, 30 Oct 2021 16:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51520] [PATCH 2/3] gnu: Add weechat-matrix. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Oct 2021 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51520 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51520@debbugs.gnu.org Cc: Arun Isaac Received: via spool by 51520-submit@debbugs.gnu.org id=B51520.16356255284623 (code B ref 51520); Sat, 30 Oct 2021 20:26:02 +0000 Received: (at 51520) by debbugs.gnu.org; 30 Oct 2021 20:25:28 +0000 Received: from localhost ([127.0.0.1]:58505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mguun-0001CB-D0 for submit@debbugs.gnu.org; Sat, 30 Oct 2021 16:25:28 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:54820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mguuk-0001Bo-II for 51520@debbugs.gnu.org; Sat, 30 Oct 2021 16:25:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1ilCvKOl5rzwksZNFGH562embV0rIrstdDuzjv5Ee70=; b=PkRnSmpISjOJK3soUicNt8i4kD za0Mnxs8ZNik3QqwTvjqU10BOoqmn89mnKR7IZPmGTBzjd54/vbuToZamn6Wh72RwLtPTSI7Z9ry/ RnvqiAlvcSXhkMG0KHXphv4ZFeSPl/xVqqFl+OMjzi5N75Jxrc1UoAP+hngltOeMY9cHF8pFtPlIk He+3kTuhCbHINVvE0j3KNaDMpX6aHjGHHXWxV8jCWqHowNEHXsS+R17h3f7Y1BmG8FFhnJ1ilJHZ/ vHpZ/k3x/NPgVQVCvFI5v2Z2+ouDAzpK6FhjHZR/4edMFH5io2SjJrijKPNS48Lt6kptWEKAzZwRM ZdfkR6sQ==; Received: from [192.168.2.1] (port=59960 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1mguui-0003Cr-7N; Sun, 31 Oct 2021 01:55:16 +0530 From: Arun Isaac Date: Sun, 31 Oct 2021 01:55:13 +0530 Message-Id: <20211030202514.18639-2-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211030202514.18639-1-arunisaac@systemreboot.net> References: <20211030202514.18639-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635625568; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1ilCvKOl5rzwksZNFGH562embV0rIrstdDuzjv5Ee70=; b=U6Vxt591aQKwqwSDDK1pydoP1AoXlZaec3WxHNb+0qN7Z8XjbFQXZJG8ITZB3cnqhwJMLj hqmXf4squsv1SmJyiTW5GgJNRPPsmYlcPGgi+DsSBTECK6XX2KMcemXk1C8NXb264XQ1Ki 0ag8OCod0i0NBUTGWRoQRgfJqb2lWwXi/P5z7Z4c62r44zXL0aK/sHZfuerrcRRKRpWJZE x0nZPZyaY55q14o+vWijd/b5HEqeMmeo4Gn+p5unShbLSk5TJ4hrQsfV0oul11sz4RkHfS 42KggNT+BYamOfqsv8LRupbWWcK3W/XRxZkhonHr/3kRW2ud9CySZIuXKT/gGg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635625568; a=rsa-sha256; cv=none; b=mUAGmm2d6ZX0V/p4/TCZhe/hp1j5O7jhsfB+z6j6Vikje2u1dj6HThwexC3PD7RDCFN8Ei aFC4lHiKQNGvkWpQyw8ELvA3HGzjMlTTlwF1/Mh8igSYaHZG9KeS9UDO1wecFtyforW7NU KDtvLLNQygpwqPjoK6fUWvK2tr8x1ycaMzq2mGyCwqc1qeGMODNuG/nZhu7oN/jU57I89/ ZUqop6u/zChzP0/w1g4ZC3j00UrBuWiMp57iHWlncK4yDfU4gUCjNOcWO1bwnFZWcP/2Cl wehPagOQSQExYpOkNJV41QA61wRh/dAJsG8wuHdqjNb59atqRQet9kHk9nNQQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=PkRnSmpI; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=PkRnSmpI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 44DB2F38B X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: A1InuNnWrIuV * gnu/packages/messaging.scm (weechat-matrix): New variable. --- gnu/packages/messaging.scm | 69 +++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index d07c1c6566..e684c60c0c 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2016 Andy Patterson ;;; Copyright © 2016, 2017, 2018, 2019 Clément Lassieur ;;; Copyright © 2017 Mekeor Melire -;;; Copyright © 2017, 2018, 2020 Arun Isaac +;;; Copyright © 2017, 2018, 2020, 2021 Arun Isaac ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice ;;; Copyright © 2017 Theodoros Foradis ;;; Copyright © 2017, 2018, 2019 Rutger Helling @@ -2992,4 +2992,71 @@ (define-public matterbridge (home-page "https://github.com/42wim/matterbridge") (license license:asl2.0))) +(define-public weechat-matrix + (package + (name "weechat-matrix") + (version "0.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/poljar/weechat-matrix") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1iv55n4k05139f7jzkhczgw4qp6qwilrvfsy3c6v2m1kxffj12d3")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((weechat-python (string-append (assoc-ref outputs "out") + "/share/weechat/python"))) + ;; Avoid circular import by renaming the matrix module to + ;; weechat_matrix. + (substitute* (cons "main.py" + (append (find-files "matrix") + (find-files "tests"))) + (("from matrix") "from weechat_matrix") + (("import matrix") "import weechat_matrix")) + ;; Install python modules. + (invoke "make" "install-lib" + (string-append "INSTALLDIR=" + (site-packages inputs outputs) + "/weechat_matrix")) + ;; Extend PYTHONPATH to find installed python modules. + (add-installed-pythonpath inputs outputs) + ;; Augment sys.path so that dependencies are found. + (substitute* "main.py" + (("import os\n" all) + (apply string-append + all + "import sys\n" + (map (lambda (path) + (string-append "sys.path.append('" path "')\n")) + (string-split (getenv "PYTHONPATH") #\:))))) + ;; Install script. + (mkdir-p weechat-python) + (copy-file "main.py" + (string-append weechat-python "/matrix.py"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest"))))))) + (inputs + `(("python-matrix-nio" ,python-matrix-nio) + ("python-pygments" ,python-pygments) + ("python-pyopenssl" ,python-pyopenssl) + ("python-webcolors" ,python-webcolors))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/poljar/weechat-matrix") + (synopsis "Weechat Matrix protocol script") + (description "@code{weechat-matrix} is a Python plugin for Weechat that lets +Weechat communicate over the Matrix protocol.") + (license license:isc))) + ;;; messaging.scm ends here -- 2.33.0