From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aI9xLYuVA19ycQAA0tVLHw (envelope-from ) for ; Mon, 06 Jul 2020 21:20:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AH9XKYuVA18/VgAA1q6Kng (envelope-from ) for ; Mon, 06 Jul 2020 21:20:11 +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 EE53F940220 for ; Mon, 6 Jul 2020 21:20:10 +0000 (UTC) Received: from localhost ([::1]:39010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsYX2-0002Qi-V5 for larch@yhetil.org; Mon, 06 Jul 2020 17:20:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsYWw-0002QW-HP for guix-patches@gnu.org; Mon, 06 Jul 2020 17:20:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jsYWw-00011k-89 for guix-patches@gnu.org; Mon, 06 Jul 2020 17:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jsYWw-0001jx-4d for guix-patches@gnu.org; Mon, 06 Jul 2020 17:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42229] [PATCH 8/9] gnu: jami: Fix compilation by providing necessary webchat files. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Jul 2020 21:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42229 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jan Wielkiewicz Cc: 42229@debbugs.gnu.org Received: via spool by 42229-submit@debbugs.gnu.org id=B42229.15940703896661 (code B ref 42229); Mon, 06 Jul 2020 21:20:02 +0000 Received: (at 42229) by debbugs.gnu.org; 6 Jul 2020 21:19:49 +0000 Received: from localhost ([127.0.0.1]:35013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsYWj-0001jM-9w for submit@debbugs.gnu.org; Mon, 06 Jul 2020 17:19:49 -0400 Received: from mira.cbaines.net ([212.71.252.8]:57344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsYWi-0001jF-DA for 42229@debbugs.gnu.org; Mon, 06 Jul 2020 17:19:49 -0400 Received: from localhost (unknown [46.237.172.69]) by mira.cbaines.net (Postfix) with ESMTPSA id 2A34A27BBE1; Mon, 6 Jul 2020 22:19:47 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id a6b2339b; Mon, 6 Jul 2020 21:19:44 +0000 (UTC) References: <20200706155030.1938-1-tona_kosmicznego_smiecia@interia.pl> <20200706155030.1938-8-tona_kosmicznego_smiecia@interia.pl> User-agent: mu4e 1.4.10; emacs 26.3 From: Christopher Baines In-reply-to: <20200706155030.1938-8-tona_kosmicznego_smiecia@interia.pl> Date: Mon, 06 Jul 2020 22:19:42 +0100 Message-ID: <87lfjwnxxt.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Spam-Score: 2.69 X-TUID: 4GNr7kqRErKU --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jan Wielkiewicz writes: > * gnu/packages/jami.scm (define-module): Add copy-build-system. > (libringclient)[source]: Delete chatview files. > [arguments]: Remove chatview files from CMakeLists.txt. > (jami-chatview): New variable. > (jami)[source]: Delete chatview directory. > [inputs]: Add jami-chatview. > [arguments]: Copu chatview files to destination. > --- > gnu/packages/jami.scm | 80 ++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 79 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm > index ea94efb2f9..58e10ae6d8 100644 > --- a/gnu/packages/jami.scm > +++ b/gnu/packages/jami.scm > @@ -56,6 +56,7 @@ > #:use-module (gnu packages xorg) > #:use-module (gnu packages) > #:use-module (guix build-system cmake) > + #:use-module (guix build-system copy) > #:use-module (guix build-system gnu) > #:use-module (guix download) > #:use-module (guix git-download) > @@ -526,6 +527,16 @@ functionality.") > (url "https://review.jami.net/ring-lrc") > (commit commit))) > (file-name (git-file-name name version)) > + (modules '((guix build utils))) > + ;; The chatview is a common code among Jami clients. > + ;; Since Guix likes functional design, I'm removing > + ;; the directory containing it and making it a new > + ;; package. The other reason is that there is no > + ;; any rule in the build system to check if it is > + ;; included. I'd perhaps just say instead that these files are packaged as jami-chatview which is used by the jami package, that's probably what's useful to know here. > + (snippet > + '(begin > + (delete-file-recursively "src/web-chatview"))) > (sha256 > (base32 > "1s1wi80drabfjhvxbiyl8k9c2jsafvmx5v84s3wldsmmdg4f6xdf"= )))) > @@ -542,6 +553,21 @@ functionality.") > (assoc-ref %build-inputs "libring") "/incl= ude")) > #:phases > (modify-phases %standard-phases > + (add-after 'unpack 'do-not-install-chatview > + (lambda _ > + (substitute* "CMakeLists.txt" > + (("src/web-chatview/.eslintrc.json") "") > + (("src/web-chatview/chatview-gnome.css") "") > + (("src/web-chatview/chatview.css") "") > + (("src/web-chatview/chatview.html") "") > + (("src/web-chatview/chatview.js") "") > + (("src/web-chatview/jed.js") "") > + (("src/web-chatview/linkify-html.js") "") > + (("src/web-chatview/linkify-string.js") "") > + (("src/web-chatview/linkify.js") "") > + (("src/web-chatview/qwebchannel.js") "") > + (("src/web-chatview/web.gresource.xml") "")) Because substitute* uses regular expressions, characters like . should probably be escaped. However, you might want to try something like the following: (substitute* "CMakeLists.txt" (("src/web-chatview/.*") "")) > + #t)) > (add-before 'configure 'fix-dbus-interfaces-path > (lambda* (#:key inputs #:allow-other-keys) > (substitute* "CMakeLists.txt" > @@ -558,6 +584,40 @@ This package provides a library common to all Jami c= lients.") > (home-page "https://jami.net") > (license license:gpl3+)))) >=20=20 > +(define-public jami-chatview > + (let ((commit "0a790d86a20ae80e5d2ee0d35452fa77cfb8cc40") > + (revision "0")) > + (package > + (name "jami-chatview") > + (version (git-version %jami-version revision commit)) > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://review.jami.net/jami-chatview") > + (commit commit))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "1zb3qa1x37kclbgk4wdg6qp4ivr6513ypj8s4k0qjps7h2clgna8"= )))) > + (build-system copy-build-system) > + (arguments > + '(#:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'allow-copying > + (lambda* (#:key inputs #:allow-other-keys) > + ;; Permissions of this file are not right. > + ;; Let's change this to allow installing it properly. > + (chmod ".eslintrc.json" #o644) > + #t))) > + #:install-plan '(("." "include/libringclient/web-chatview") > + (".eslintrc.json" > + "include/libringclient/web-chatview/.eslintrc= .json")))) > + (synopsis "Chatview for Jami") > + (description "Web chatview for Jami - html, css, js files. > +It provides some common code for Jami clients.") It would be good if this could be clearer as to what the user gets if they install this package. I'm guessing because it's an input to Jami, it's probably not useful to have it in your profile? Also, if it's going to describe the contents of the package, I'd do it in a full sentance, so something like: "This package provides the HTML, CSS and JavaScript files for the web chatview for Jami". > + (home-page "https://jami.net") > + (license license:gpl3+)))) I think there's some Expat stuff in there too. > + > (define-public jami > (let ((commit "85cda2e1fde84230f6b9f5419f9ec1e23867c2a1") > (revision "0")) > @@ -570,6 +630,11 @@ This package provides a library common to all Jami c= lients.") > (url "https://review.jami.net/ring-client-gnome") > (commit commit))) > (file-name (git-file-name name version)) > + (modules '((guix build utils))) > + ;; The web directory contains links to nowhere > + (snippet > + '(begin > + (delete-file-recursively "web"))) > (sha256 > (base32 > "0xzcx8x04yc8m8b2vf7sxfgw79idbm0hifzaw4s2vh26hyy9sp2g"= )))) > @@ -584,6 +649,8 @@ This package provides a library common to all Jami cl= ients.") > ("clutter-gtk" ,clutter-gtk) > ("libcanberra" ,libcanberra) > ("libnm" ,network-manager) > + ("jami-chatview" ,jami-chatview) > + ("qtbase" ,qtbase) > ("webkitgtk" ,webkitgtk) > ("sqlite" ,sqlite))) > (native-inputs > @@ -596,7 +663,18 @@ This package provides a library common to all Jami c= lients.") > ("adwaita-icon-theme" ,adwaita-icon-theme) > ("evolution-data-server" ,evolution-data-server))) > (arguments > - `(#:tests? #f)) ; There is no testsuite. > + `(#:tests? #f ; There is no testsuite. > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'copy-chatview-files > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((chatview > + (string-append > + (assoc-ref inputs "jami-chatview") > + "/include/libringclient/web-chatview")) > + (destination-dir "web")) > + (copy-recursively chatview destination-dir)) Rather than copying, could this be a symlink? That way you're just using another store item, rather than copying the files from one to another. > + #t))))) > (synopsis "Distributed, privacy-respecting communication program") > (description "Jami (formerly GNU Ring) is a secure and distributed= voice, > video and chat communication platform that requires no centralized serve= r and --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl8DlW5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeeWxAAjg04nd88QSRJ/1CjJMqguDPm/Ma6YMISEOERmMTLeZ3YCSv+7/T7GN1C BI+vruetmTksXHa5hPPF19TAW+lF9lI32vV7W40McveDdr8SDEyXfSkD/6ERPMkB OMp9SkNPsm2DAodp+Ql3yvOwcLA58PFhXcXh3/XeZXVh9MQKmYpDfNulL63+69JG jgC0bi/S+C5Xy0UboQ2WbX72HO7PPBZqX6SXAgB+VFHhxxCedcYELVnLufgIDFeh gGEG7PzQeJe/R7XT4FB+hdpyXKbYEbHA0FQed4tksyqmBk4ghWK9vjVGsnIXd4ke kqjTee+3ZjxFY6XNtRQ8IuM52sFPpS3TRSS4Uv4MqR25cpTuj2G9XRr+lZwSNtzw Sg1tm6iAPtfqizewwkkYJVmOo8sT/oa7u1KC1FhTR552pbJRIiK8E/KfTdkmFaMk OAa6sKpFIFRoZFYKKp7X3RJqedJh/rDv/d5UpoaCvg6pXhik887lqTvNfH8bXOuE 19JPKxzMoG7OyPFZ0ZUQf7jsDgxNmxLvyS5NBn6iijtNumLN5QFC+pgB3BZBm1WE 93EHbF815Xv+F51jBuvDnSVcaV2UI/WvXKZzWRtoPnPBKmz3BIVcdDjaGVcQFgJx G45/cgn6VrcqOtjArl5vPVpFJDLDVJca3939VTgTNqGiCEa8t1g= =Ik5G -----END PGP SIGNATURE----- --=-=-=--