From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CBzwGEqslV/jYAAA0tVLHw (envelope-from ) for ; Sun, 25 Oct 2020 16:48:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uOTGFEqslV8mdwAAB5/wlQ (envelope-from ) for ; Sun, 25 Oct 2020 16:48:10 +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 E0C37940148 for ; Sun, 25 Oct 2020 16:48:09 +0000 (UTC) Received: from localhost ([::1]:60890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWjBg-0001ID-JE for larch@yhetil.org; Sun, 25 Oct 2020 12:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWjBZ-0001Ht-TN for guix-patches@gnu.org; Sun, 25 Oct 2020 12:48:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54175) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWjBZ-0004By-Km for guix-patches@gnu.org; Sun, 25 Oct 2020 12:48:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWjBZ-0006si-JY for guix-patches@gnu.org; Sun, 25 Oct 2020 12:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44191] gnu: Add kristall Resent-From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Oct 2020 16:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44191 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Christopher Baines Cc: 44191@debbugs.gnu.org, nicolo@nixo.xyz Received: via spool by 44191-submit@debbugs.gnu.org id=B44191.160364444526408 (code B ref 44191); Sun, 25 Oct 2020 16:48:01 +0000 Received: (at 44191) by debbugs.gnu.org; 25 Oct 2020 16:47:25 +0000 Received: from localhost ([127.0.0.1]:37488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWjAw-0006pB-P1 for submit@debbugs.gnu.org; Sun, 25 Oct 2020 12:47:25 -0400 Received: from mail-ed1-f50.google.com ([209.85.208.50]:44205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWjAr-0006h6-Gj for 44191@debbugs.gnu.org; Sun, 25 Oct 2020 12:47:21 -0400 Received: by mail-ed1-f50.google.com with SMTP id t20so6933955edr.11 for <44191@debbugs.gnu.org>; Sun, 25 Oct 2020 09:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=ztVP0Ok0r1ii0Y1jEIuHKLjD2yxKOAwIOwARvRePAcM=; b=R0HUaRaMB3w1JU/zYvAshOWc4IYaJajV0uUktMMLdXKAyFhQlC8cz3v4IY0aulXseg g1KAp406MjaFYXSxCz0SmlXnOvIAwfS2Dbn/xAxauqWSelkYDQxuR81xyCfvOoHSqBpS /R+D88TcJawNploNufca4GmX0L6vin+d73QG74zFjPuTcs9cmPJuRYWv9uC1qkNU2VJK GVDAtDiyAnYTjCJ4CAhJ2o4gjSwM+qXdbrZIDy4FuCgM9DSj271vOmd6fyDOUuxjwPBP /IFMcVNEfsdu4RsVjOd6QYjveCSjeps0lgVwkW8u742/Mu/Keh3hQTFLDo0AqZvFZuFp 30lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=ztVP0Ok0r1ii0Y1jEIuHKLjD2yxKOAwIOwARvRePAcM=; b=UFbTaYNEx7WGysG0jESIfP/d1haw1+3HjMu3Hg+/MFmUOlX8lbQhfCsABRs5nYs1Zo RQWc/X7cVi7euDQ/07KRYemO1WU47QwZFizO4D5bHA6suZAT2J5CeCz/VbHf9k2i8vok aGt6iC8o0vBMHkRlJ0sDR+NcDGcQupEFEnlhPhfmCsduuM1QB19FJ/2YkmsxXzlmPRgG zV4hOe/AjNJO86hT/HAJIy+ps813M4yWfmVQFoPjTbCHAUzEIaWX/8nMAmBDGTfqYgBS 8c3H6GMJl7PW+h2rYAL9DRMahqE/u0K5DCpQJpSaL60lsNwE2liA/W7cwZQ00TwWu0ZG /MrA== X-Gm-Message-State: AOAM532PYfUm9aCjKZZ7qUVAGSuM2jo8wQ62tFdldSpfepUOv+XUxW9+ SUju+yfVlIPuaJXiLtCig6o= X-Google-Smtp-Source: ABdhPJz9nhk0Qk5TjLNh1m4GsfJ3rsLj/Sv0xKHlAs+cJj1MV62kX5fGRXVKHmFPQjKzc8ZJ0R1QYw== X-Received: by 2002:aa7:dcc7:: with SMTP id w7mr12485921edu.54.1603644431387; Sun, 25 Oct 2020 09:47:11 -0700 (PDT) Received: from guixSD (host-95-237-183-89.retail.telecomitalia.it. [95.237.183.89]) by smtp.gmail.com with ESMTPSA id e16sm4249345ejr.91.2020.10.25.09.47.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 09:47:10 -0700 (PDT) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti In-Reply-To: <87o8kqab7i.fsf@cbaines.net> References: <8736233h7h.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87o8kqab7i.fsf@cbaines.net> Date: Sun, 25 Oct 2020 17:47:01 +0100 Message-ID: <87tuui1ce2.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.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=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=R0HUaRaM; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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-Spam-Score: 0.09 X-TUID: deiauNu7mBn9 Hi Chris! Thanks for the review. I tried, but: 1. breeze is a different package from the ones in the repo (url is https://github.com/Alexhuszagh/BreezeStyleSheets). It does not seems to be compiled, I can try to package it. 2. there are files in lib/cmark that are not present in the cmark distribution (thei are .h files generated by their .h.in), so I cannot extract our cmark source directly - I tried keeping those files, but build fails [[failed-build]]. Not su= re if it's a patched version or if it's an older one. But I can investigate probably 3. Should I do the same for fonts file? It depends on Noto (that we have in the store) and on OpenMoji (I can package it) Just for reference, I attached the current WIP package definition ([[current-package-definition]] which is getting complex. Is there a better way to achieve the "delete a folder, but keep some file"?) Thanks! Nicol=C3=B2 #+name: failed-build #+begin_example=20 ../src/renderers/markdownrenderer.cpp: In function =E2=80=98QString extract= NodeText(const cmark_node&)=E2=80=99: ../src/renderers/markdownrenderer.cpp:102:48: error: =E2=80=98const cmark_n= ode {aka const struct cmark_node}=E2=80=99 has no member named =E2=80=98dat= a=E2=80=99 return QString::fromUtf8((char const*)node.data, node.len); ^~~~ ../src/renderers/markdownrenderer.cpp:102:59: error: =E2=80=98const cmark_n= ode {aka const struct cmark_node}=E2=80=99 has no member named =E2=80=98len= =E2=80=99 return QString::fromUtf8((char const*)node.data, node.len); ^~~ ../src/renderers/markdownrenderer.cpp: In function =E2=80=98void renderNode= (RenderState&, const cmark_node&, QTextCharFormat)=E2=80=99: ../src/renderers/markdownrenderer.cpp:262:67: error: invalid cast from type= =E2=80=98const cmark_chunk=E2=80=99 to type =E2=80=98char*=E2=80=99 QUrl absolute_url =3D QString::fromUtf8((char*)node.as.link.url); #+end_example #+name: current-package-definition #+begin_src scheme (define-public kristall ;; Fixes to the build system applied after the latest tag ;; Use tagged release when updating (let ((commit "b684f94f1af9a19c1a6fd70d72097a13b75e1ca6") (revision "1")) (package (name "kristall") (version (string-append "0.3-" revision "." (string-take commit 7))) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/MasterQ32/kristall") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0kbn98pn8iplqkg7gxx4nysvgsn1621z95ynfr2f9jhsfsgz4r0z")) (modules '((guix build utils) (ice-9 match))) (snippet '(begin ;; /gnu/store/qy99msdihnam407659xdqdb4p99f0ava-font-google-not= o-20171025/share/fonts/truetype/NotoColorEmoji.ttf ;; Remove bundled programs. ;; kristall requires some files in the cmark dir that are not ;; available in cmark sources. Move it away from the directory ;; and then back in (with-directory-excursion "lib" (let ((files-to-keep '(("cmark/cmark.pri" "cmark.pri") ("cmark/src/config.h" "config.h") ("cmark/src/cmark.h" "cmark.h") ("cmark/src/cmark_export.h" "cmark_ex= port.h") ("cmark/src/cmark_version.h" "cmark_v= ersion.h")))) ;; Copy away files to keep (map (match-lambda ((src . (dest)) (rename-file src dest))) files-to-keep) ;; Delete extra (bundled) files (map (lambda (dir) (delete-file-recursively dir)) '("cmark" ;; "BreezeStyleSheets" )) ;; Put files to keep back in their original place (mkdir-p "cmark/src") (map (match-lambda ((dest . (src)) (rename-file src dest))) files-to-keep))) ;; Remove bundled fonts (delete-file-recursively "fonts") #t)))) (build-system gnu-build-system) (arguments `(#:modules ((guix build gnu-build-system) (guix build qt-utils) (guix build utils)) #:imported-modules (,@%gnu-build-system-modules (guix build qt-utils)) #:make-flags (list (string-append "PREFIX=3D" %output)) #:phases (modify-phases %standard-phases (delete 'configure) ; no ./configure script (delete 'check) ; no check target (add-after 'unpack 'replace-bundled-libs (lambda* (#:key inputs #:allow-other-keys) (let ((cmark (assoc-ref inputs "cmark-sources")) ;; (breeze (assoc-ref inputs "breeze-sources")) ) ;; (invoke "tar" "-xf" breeze "-C" "./lib/") ;; (rename-file "./lib/breeze-5.19.5" "./lib/BreezeStyleSh= eets") (invoke "tar" "-xf" cmark "-C" "./lib/cmark" "--strip-comp= onents" "1") #t))) (add-before 'build 'set-program-version ;; runs git describe --tags by default (lambda _ ;; configure.ac relies on =E2=80=98git --describe=E2=80=99 t= o get the version. ;; Patch it to just return the real version number directly. (substitute* "src/kristall.pro" (("(KRISTALL_VERSION=3D).*" _ match) (string-append match ,version "\n"))))) (add-after 'install 'wrap-program (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (wrap-qt-program out "kristall")) #t))))) (inputs `(("breeze-sources" ,(package-source breeze-assets)) ("cmark-sources" ,(package-source cmark)) ("openssl" ,openssl) ("qtbase" ,qtbase) ("qtmultimedia" ,qtmultimedia) ("qtsvg" ,qtsvg))) (home-page "https://github.com/MasterQ32/kristall") (synopsis "Small-internet graphical client") (description "Graphical small-internet client with with many features including multi-protocol support (gemini, http, https, gopher, finger), bookmarks, TSL certificates management, outline generation, tabbed interface and more.") (license license:gpl3)))) #+end_src Christopher Baines writes: > Nicol=C3=B2 Balzarotti writes: > >> Hi guix! >> >> This patch adds kristall, a qt browser for gemini and gopher. >> >> There were some problems with the latest tagged version (V0.3), such as >> directories that had to be created manually before install. I preferred >> to use the latest commit (as the author still does not know when a new >> release will happen). Let me know if it's fine. >> >> Without the wrap-qt-program icons were missing. >> >> guix lint reports no warnings. > > Hey! > > Thanks for the patch. > > I've had a quick look, and spotted one thing. The Git repository > includes lib/BreezeStyleSheets and lib/cmark, which are both packaged > for Guix (I'm unsure about luis-l-gist). It would be good to look at > removing/not using the copied code from kristall and using the Guix > packages instead. > > Does that make sense? > > Thanks, > > Chris