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 +E0HK2fvr1/vOwAA0tVLHw (envelope-from ) for ; Sat, 14 Nov 2020 14:53:27 +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 kJUIJ2fvr19DCgAA1q6Kng (envelope-from ) for ; Sat, 14 Nov 2020 14:53:27 +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 0E34794050F for ; Sat, 14 Nov 2020 14:53:27 +0000 (UTC) Received: from localhost ([::1]:34296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdwvd-0001ZJ-Ib for larch@yhetil.org; Sat, 14 Nov 2020 09:53:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdwvH-0001Z5-95 for guix-patches@gnu.org; Sat, 14 Nov 2020 09:53:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdwvG-0006z8-Aq for guix-patches@gnu.org; Sat, 14 Nov 2020 09:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdwvG-0000NR-AQ for guix-patches@gnu.org; Sat, 14 Nov 2020 09:53:02 -0500 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: Sat, 14 Nov 2020 14:53: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: Christopher Baines Cc: 44191@debbugs.gnu.org, nicolo@nixo.xyz Received: via spool by 44191-submit@debbugs.gnu.org id=B44191.16053655741436 (code B ref 44191); Sat, 14 Nov 2020 14:53:02 +0000 Received: (at 44191) by debbugs.gnu.org; 14 Nov 2020 14:52:54 +0000 Received: from localhost ([127.0.0.1]:50214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdwv1-0000Mv-R9 for submit@debbugs.gnu.org; Sat, 14 Nov 2020 09:52:54 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:42118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdwuy-0000Mh-1x for 44191@debbugs.gnu.org; Sat, 14 Nov 2020 09:52:47 -0500 Received: by mail-wr1-f42.google.com with SMTP id l1so13526352wrb.9 for <44191@debbugs.gnu.org>; Sat, 14 Nov 2020 06:52:43 -0800 (PST) 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; bh=GRKy0y3yiHQwsVnpphdWuvmckF7ypNlBQtgsduF51O0=; b=X814RB1ElrnYfHPB2grExcpkz0qqbrbRQ9uWg/Rm3FXJ5tv1xVaejvlELKDoB53lFR iAD0Yy4ZEJPzWRmG/j1ctY0ANXwptU1Ae/rwjDcrACPJYvREEVIDJnOcnWKjmaEjQdBe mzI13B4dPsrMCdXVznb1AjpRDdpMOutRE+K8lJpIuh0zP/33dnWPrLk1OZJLhVkhwlAs a93PchT/JCSPOoC7YXm8JI0dsXmRZ3/VsdzgcjsX9SLlkp83UCnJ52+hoakMrNv1Isit LC7RCS6vWa3chdD05iH7wjReOhexiFCXFxfYU1XoeSpmYDc3yqogbkV8iSVADHvsebsa kebQ== 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; bh=GRKy0y3yiHQwsVnpphdWuvmckF7ypNlBQtgsduF51O0=; b=CZT4Le0V3JUtHsRt42cm3d9Wqr+RwAKZH3Nmmo5JrMAInnZK9fbxZawnJWbQFGCh/d 725mF/JgxRhTSj4IwLOMOWz2HN8GY6jlr3PWtKn1jN/MXUKGukMpPyV8oDL8OFJaFAKQ dvhdU9Y6hak07iOKcg1v16VMAckfhzN4WsZ9WdneBWfaQ46Yq5beOCsEzGSO+YWVWLDp m5Y+QLlY8WjkxQ2lL0axsiXpqx7C1mp+lckx5O3n5LCkbj6+YYWqUewQuzZen4dkebGh 9yi0Xb0dBTx3RRXZVeRXjDkJcerBAPppu3F7m/d4BM864N3oMV3/C8RZ1r1SjVImwsk4 MXSg== X-Gm-Message-State: AOAM531TaKaTpUXInYsLdW5rO3IFbZFhJIbalB/hlDsjrDRIIlDUfSO7 bn7Geq4OwvRcwWyUsLhm+mI= X-Google-Smtp-Source: ABdhPJwguEAuWXSjR0PGrZLhO1mz5m04x3cF9hvB5xQEJKXTY7xwKfdVzkBLWDQxZYOBnrVpvaVpDg== X-Received: by 2002:adf:dc47:: with SMTP id m7mr9861298wrj.21.1605365558110; Sat, 14 Nov 2020 06:52:38 -0800 (PST) Received: from guixSD (host-95-244-15-230.retail.telecomitalia.it. [95.244.15.230]) by smtp.gmail.com with ESMTPSA id 90sm15724199wrl.30.2020.11.14.06.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 06:52:36 -0800 (PST) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti In-Reply-To: <87ft5hougw.fsf@cbaines.net> 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> <87sg9uxhtc.fsf@cbaines.net> <87k0v2ycgd.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87ft5hougw.fsf@cbaines.net> Date: Sat, 14 Nov 2020 15:52:35 +0100 Message-ID: <87y2j47zyk.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=X814RB1E; 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: Wwhgg1WLhMsR --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Chris! Sorry for the delay, here's the updated patch. I addedd breeze-stylesheet as an input, and added the phase "dont-use-bundled-fonts" that replaces relative links to absolute links to the fonts, as you suggested. I also added the copyright line I forgot. Thanks again! Nicol=C3=B2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=v2-0001-gnu-Add-kristall.patch Content-Transfer-Encoding: quoted-printable >From 08f2cf3033d763ffc0c753bbb7817cdb5484f362 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 27 Oct 2020 14:18:23 +0100 Subject: [PATCH v2] gnu: Add kristall. * gnu/packages/web-browsers.scm (kristall): New variable. --- gnu/packages/web-browsers.scm | 122 ++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index eb49a8fdea..11928ef696 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -13,6 +13,7 @@ ;;; Copyright =C2=A9 2020 Raghav Gururajan ;;; Copyright =C2=A9 2020 B. Wilson ;;; Copyright =C2=A9 2020 Michael Rohleder +;;; Copyright =C2=A9 2020 Nicol=C3=B2 Balzarotti ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,6 +47,7 @@ #:use-module (gnu packages documentation) #:use-module (gnu packages fltk) #:use-module (gnu packages fontutils) + #:use-module (gnu packages fonts) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gcc) #:use-module (gnu packages glib) @@ -60,6 +62,7 @@ #:use-module (gnu packages lisp) #:use-module (gnu packages lisp-xyz) #:use-module (gnu packages lua) + #:use-module (gnu packages markup) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -341,6 +344,125 @@ access.") (properties `((lint-hidden-cve . ("CVE-2016-9179")))) (license license:gpl2))) =20 +(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 + "1zakhxr30n7dawig7c8mizaqxwnqn3a7pz0yi7hc55nn7n7iyr6l")) + (modules '((srfi srfi-1) + (ice-9 ftw) + (guix build utils))) + (snippet + '(let ((preserved-lib-files '("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 + (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"))) + #t)) + (add-before 'build 'dont-use-bundled-cmark + (lambda _ + (substitute* "src/kristall.pro" + (("(^include\\(.*cmark.*)" _ match) + (string-append + "LIBS +=3D -I" (assoc-ref %build-inputs "cmark") " -lcm= ark"))) + #t)) + (add-before 'build 'dont-use-bundled-breeze-stylesheet + (lambda _ + (substitute* "src/kristall.pro" + (("../lib/BreezeStyleSheets/breeze.qrc") + (string-append + (assoc-ref %build-inputs "breeze-stylesheet") "/breeze.= qrc"))) + #t)) + (add-before 'build 'dont-use-bundled-fonts + (lambda _ + (substitute* "src/kristall.pro" + ((".*fonts.qrc.*") "")) + (substitute* "src/main.cpp" + (("/fonts/OpenMoji-Color") + (string-append + (assoc-ref %build-inputs "font-openmoji") + "/share/fonts/truetype/OpenMoji-Color")) + (("/fonts/NotoColorEmoji") + (string-append + (assoc-ref %build-inputs "font-google-noto") + "/share/fonts/truetype/NotoColorEmoji"))) + #t)) + (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-stylesheet" + ,(origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/Alexhuszagh/BreezeStyleSheets") + (commit "2d595a956f8a5f493aa51139a470b768a6d82cce"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1kvkxkisi3czldnb43ig60l55pi4a3m2a4ixp7krhpf9fc5wp294")))) + ("cmark" ,cmark) + ("font-google-noto" ,font-google-noto) + ("font-openmoji" ,font-openmoji) + ("openssl" ,openssl) + ("qtbase" ,qtbase) + ("qtmultimedia" ,qtmultimedia) + ("qtsvg" ,qtsvg))) + (home-page "https://kristall.random-projects.net") + (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 and tabbed +interface.") + (license (list license:gpl3+ + ;; for breeze-stylesheet + license:expat))))) + (define-public qutebrowser (package (name "qutebrowser") --=20 2.29.2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Christopher Baines writes: > Nicol=C3=B2 Balzarotti writes: > >> Christopher Baines writes: >>> >>> 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. >>> >> Would it be better to at least pass it's origin as an input? >> >> #+begin_src scheme >> ("breeze-stylesheet" >> ,(origin >> (method git-fetch) >> (uri >> (git-reference >> (url "https://github.com/Alexhuszagh/BreezeStyleSheets") >> (commit "2d595a956f8a5f493aa51139a470b768a6d82cce"))) >> (file-name (git-file-name name version)) >> (sha256 >> (base32 >> "1kvkxkisi3czldnb43ig60l55pi4a3m2a4ixp7krhpf9fc5wp294")))) >> #+end_src >> >> I'm ok with making a package for it, but in that case I'm not sure what >> to do. I think I'd use the copy-build-system, right? Should the package >> be hidden? > > I don't mind, I think it's OK as is. > >>> 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. >>> >>> 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)? >> >> Regarding fonts, >> I tried removing both from the inputs, and emojis at this page [1] >> rendered just fine. >> Should I just remove them from the inputs and let the user install them? >> The code tries to load them with the relative path: >> >> #+begin_src cpp >> // Provide OpenMoji font for a safe fallback >> QFontDatabase::addApplicationFont(":/fonts/OpenMoji-Color.ttf"); >> QFontDatabase::addApplicationFont(":/fonts/NotoColorEmoji.ttf"); >> #+end_src >> >> This function fails silently (The function returns -1 if the font could >> not be loaded.) and the error code is not checked, so we don't even need >> to patch kristall source for this. > > If there's an expectation or a use in making sure these fonts are > available, it would be good to patch the relative paths to be the > absolute paths within the font-openmoji package. --=-=-=--