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 2H+ZHdrInV+GGwAA0tVLHw (envelope-from ) for ; Sat, 31 Oct 2020 20:28: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 mp0 with LMTPS id JlJsGdrInV+EWQAA1q6Kng (envelope-from ) for ; Sat, 31 Oct 2020 20:28: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 CF3B59403A0 for ; Sat, 31 Oct 2020 20:28:09 +0000 (UTC) Received: from localhost ([::1]:44726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYxTs-0003fh-ES for larch@yhetil.org; Sat, 31 Oct 2020 16:28:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYxTm-0003fS-HO for guix-patches@gnu.org; Sat, 31 Oct 2020 16:28:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYxTm-00008p-8h for guix-patches@gnu.org; Sat, 31 Oct 2020 16:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYxTm-0001TU-4o for guix-patches@gnu.org; Sat, 31 Oct 2020 16:28:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44191] gnu: Add kristall Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 31 Oct 2020 20:28:02 +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: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Cc: 44191@debbugs.gnu.org, nicolo@nixo.xyz Received: via spool by 44191-submit@debbugs.gnu.org id=B44191.16041760255599 (code B ref 44191); Sat, 31 Oct 2020 20:28:02 +0000 Received: (at 44191) by debbugs.gnu.org; 31 Oct 2020 20:27:05 +0000 Received: from localhost ([127.0.0.1]:34643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYxSq-0001SE-Jb for submit@debbugs.gnu.org; Sat, 31 Oct 2020 16:27:05 -0400 Received: from mira.cbaines.net ([212.71.252.8]:46472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYxSl-0001Rk-Bw for 44191@debbugs.gnu.org; Sat, 31 Oct 2020 16:27:03 -0400 Received: from localhost (188.28.126.167.threembb.co.uk [188.28.126.167]) by mira.cbaines.net (Postfix) with ESMTPSA id 7C49C27BBF2; Sat, 31 Oct 2020 20:26:58 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 784c2a16; Sat, 31 Oct 2020 20:26:56 +0000 (UTC) References: <8736233h7h.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87o8kqab7i.fsf@cbaines.net> <87tuui1ce2.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87imaxym37.fsf@cbaines.net> <87sga0n9ew.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87o8knn6rm.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> User-agent: mu4e 1.4.13; emacs 27.1 From: Christopher Baines In-reply-to: <87o8knn6rm.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 31 Oct 2020 20:26:55 +0000 Message-ID: <87sg9uxhtc.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 1.5 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: 0.5 (/) 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: ns3122888.ip-94-23-21.eu 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: -3.11 X-TUID: IjRiiEEwBgTE --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Nicol=C3=B2 Balzarotti writes: > The PR has been merged (so now I can link to cmark just fine). Great, that's good news :) > Find attached the new patches. I've gone ahead and pushed the font-openmoji package. I tweaked the synopsis and description a bit to try and make them more objective, and removed the comment about building the font, as that could (hopefully) get out of date. > I'm unsure about BreezeStyleSheets, as the install instructions > specifically say: > > #+begin_quote > Copy breeze.qrc, dark.qss, light.qss and the dark and light folders into > your project directory and add the qrc file to your project file. > #+end_quote Given this is a stylesheet, rather than cmark, I don't think it's a blocker, although I do think it would be neater to have a package for it. I've made some more comments below, and I wanted to enquire about exactly how the fonts are used, but I think this is pretty much ready to merge. +(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 "bf5b2ecd0fde117d550adeadee48d74034ed2cdb"))) You can use the commit here, so (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1zakhxr30n7dawig7c8mizaqxwnqn3a7pz0yi7hc55nn7n7iyr6l")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundled programs. + (with-directory-excursion "lib" + ;; Delete extra (bundled) files + (map (lambda (dir) (delete-file-recursively dir)) + ;; "BreezeStyleSheets" + '("cmark"))) + ;; Contains executable of 7z and pscp + (delete-file-recursively "ci/tools") + ;; Remove bundled fonts + (delete-file-recursively "src/fonts") + #t))) I'd rework this so that rather than saying what's deleted, it says what's kept, as that's the important thing. So something like: (modules '((srfi srfi-1) (ice-9 ftw) (guix build utils))) (snippet '(let ((preserved-lib-files '("BreezeStyleSheets" "luis-l-gist"))) (with-directory-excursion "lib" (for-each (lambda (directory) (simple-format #t "deleting: ~A\n" directory) (delete-file-recursively directory)) (lset-difference string=3D? (scandir ".") (cons* "." ".." preserved-lib-files)))) ;; Contains executable of 7z and pscp (delete-file-recursively "ci/tools") ;; Remove bundled fonts (delete-file-recursively "src/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-before 'build 'set-program-version + ;; runs git describe --tags by default This comment above is probably unnecessary, the one below is better. + (lambda _ + ;; configure.ac relies on =E2=80=98git --describe=E2=80=99 = to 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"))))) I think it's still practice to have #t at the end of phases, so I'd add that in here. + (add-before 'build 'replace-bundled-cmark This doesn't really replace the bundled cmark, it's stripped out by the source snippet. I'd say something like dont-use-bundled-cmark. + (lambda _ + (substitute* "src/kristall.pro" + (("(^include\\(.*cmark.*)" _ match) + (string-append + "LIBS +=3D -I" (assoc-ref %build-inputs "cmark") " -lcm= ark"))) + (substitute* "src/renderers/markdownrenderer.cpp" + (("(include.*node.*)" _ match) + (string-append "// " match))))) As above with #t at the end. + (add-before 'build 'replace-bundled-fonts + (lambda _ + (let ((noto (assoc-ref %build-inputs "font-google-noto")) + (openmoji (assoc-ref %build-inputs "font-openmoji")) + (srcdir "/share/fonts/truetype/") + (outdir "src/fonts/")) + (mkdir-p outdir) + (copy-file + (string-append noto srcdir "NotoColorEmoji.ttf") + (string-append outdir "NotoColorEmoji.ttf")) + (copy-file + (string-append openmoji srcdir "OpenMoji-Color.ttf") + (string-append outdir "OpenMoji-Color.ttf"))) + #t)) I'd maybe use symlink rather than copy file, since you want the fonts to be used from the respective packages in the store, however, is this just to satisfy the build system? It looks to me like the XDG_DATA_DIRS wrapping is probably what'll make the fonts work at runtime (if anything)? + (add-after 'install 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-qt-program out "kristall")) + #t))))) + (inputs + `(("cmark" ,cmark) + ("font-google-noto" ,font-google-noto) + ("font-openmoji" ,font-openmoji) + ("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 interfa= ce +and more.") I think this is good, but I'd change the end to "outline generation and tabbed interface.", "and more" is a bit too unnecessary/unobjective for me. + (license license:gpl3)))) The README suggests the intention is gpl3+, additionally, with the bundled copy of BreezeStyleSheets it would be good to mention expat here as well, so something like: (license (list license:gpl3+ license:expat)) ; for BreezeStyleSheets --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+dyI9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XccHQ/9GwA+yJgolNGCsjXHKm0l2iXW68CPVpke LlDuZe2xa32mr7e86f/M0w18RvPNP2xcMchIxwVATpuohiqQD83O/6RJ8yjxICPD SsBBuGQpNH26zc/tQj+zWfAX262DepeuGU8+6ANvGk5qxlLf1L/1sUA7RwSiysTH LdPesiVoL8H/FT0uE8r0YnI/yvShSuE/qGQSBStNISIgivuPec1Vwzhu59HiwcD0 xiqE7J7HgDUO1HMn7XOQAQhLJFscq3twDtZ0+UNgrT288EzgsGbThr29YCgnNt/1 1S+jAuqXth/vujKJUG5KHqje5dhGnrg9P0B28MTsM59/KO6pJxzdetZfDmZCUP8P PnqA+4NCRG6Reb7tDcZK2927o3reb8eUu44/ixu/prF7vT3grSuAkNTtBLygF/Kb zYFiM0TIIgcaqsPLfQXYbpzmBZQx4nQpzVW6owT5bt+jTLQpuctrw+TJjd5CcKMR xuLvtqqe4WaM5cbnxvugj0AN3hHr6cEv2pmlROZUirT7zr3JRWqFOJel2Pw4Uu2g IvEtVZA1d81rHV84gRj3AWK0wCBmDWVAvheOb1+HVCXxylbZRcQlSWjCfFcTvDJO HDLqO/EKAL4qXwDRJBFgV49REizgAqzJh2LR+joOy1TPf6WdmxhoKI1wRHhelbsu uI4WQT3a/v0= =q8ha -----END PGP SIGNATURE----- --=-=-=--