* [bug#44191] gnu: Add kristall
@ 2020-10-24 13:07 Nicolò Balzarotti
2020-10-25 9:47 ` Christopher Baines
0 siblings, 1 reply; 11+ messages in thread
From: Nicolò Balzarotti @ 2020-10-24 13:07 UTC (permalink / raw)
To: 44191; +Cc: nicolo
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
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.
Thanks!
Nicolò
[-- Attachment #2: 0001-gnu-Add-kristall.patch --]
[-- Type: text/x-patch, Size: 3619 bytes --]
From c52c3ea7297c1b11cb3dd2ca7f5a12492e42defe Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Sat, 24 Oct 2020 15:00:30 +0200
Subject: [PATCH] gnu: Add kristall.
* gnu/packages/web-browsers.scm (kristall): New variable.
---
gnu/packages/web-browsers.scm | 59 +++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index eb49a8fdea..f564f25f20 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -341,6 +342,64 @@ access.")
(properties `((lint-hidden-cve . ("CVE-2016-9179"))))
(license license:gpl2)))
+(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)))))
+ (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=" %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
+ (lambda _
+ ;; configure.ac relies on ‘git --describe’ to get the version.
+ ;; Patch it to just return the real version number directly.
+ (substitute* "src/kristall.pro"
+ (("(KRISTALL_VERSION=).*" _ 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
+ `(("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))))
+
(define-public qutebrowser
(package
(name "qutebrowser")
--
2.28.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-10-24 13:07 [bug#44191] gnu: Add kristall Nicolò Balzarotti
@ 2020-10-25 9:47 ` Christopher Baines
2020-10-25 16:47 ` Nicolò Balzarotti
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Baines @ 2020-10-25 9:47 UTC (permalink / raw)
To: Nicolò Balzarotti; +Cc: 44191, nicolo
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
Nicolò Balzarotti <anothersms@gmail.com> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-10-25 9:47 ` Christopher Baines
@ 2020-10-25 16:47 ` Nicolò Balzarotti
2020-10-26 16:43 ` Christopher Baines
0 siblings, 1 reply; 11+ messages in thread
From: Nicolò Balzarotti @ 2020-10-25 16:47 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44191, nicolo
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 sure 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ò
#+name: failed-build
#+begin_example
../src/renderers/markdownrenderer.cpp: In function ‘QString extractNodeText(const cmark_node&)’:
../src/renderers/markdownrenderer.cpp:102:48: error: ‘const cmark_node {aka const struct cmark_node}’ has no member named ‘data’
return QString::fromUtf8((char const*)node.data, node.len);
^~~~
../src/renderers/markdownrenderer.cpp:102:59: error: ‘const cmark_node {aka const struct cmark_node}’ has no member named ‘len’
return QString::fromUtf8((char const*)node.data, node.len);
^~~
../src/renderers/markdownrenderer.cpp: In function ‘void renderNode(RenderState&, const cmark_node&, QTextCharFormat)’:
../src/renderers/markdownrenderer.cpp:262:67: error: invalid cast from type ‘const cmark_chunk’ to type ‘char*’
QUrl absolute_url = 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-noto-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_export.h")
("cmark/src/cmark_version.h" "cmark_version.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=" %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/BreezeStyleSheets")
(invoke "tar" "-xf" cmark "-C" "./lib/cmark" "--strip-components" "1")
#t)))
(add-before 'build 'set-program-version
;; runs git describe --tags by default
(lambda _
;; configure.ac relies on ‘git --describe’ to get the version.
;; Patch it to just return the real version number directly.
(substitute* "src/kristall.pro"
(("(KRISTALL_VERSION=).*" _ 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 <mail@cbaines.net> writes:
> Nicolò Balzarotti <anothersms@gmail.com> 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-10-25 16:47 ` Nicolò Balzarotti
@ 2020-10-26 16:43 ` Christopher Baines
2020-10-26 18:12 ` Nicolò Balzarotti
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Baines @ 2020-10-26 16:43 UTC (permalink / raw)
To: Nicolò Balzarotti; +Cc: 44191, nicolo
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
Nicolò Balzarotti <anothersms@gmail.com> writes:
> 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 sure if it's
> a patched version or if it's an older one. But I can investigate
> probably
I think you might be overcomplicating this. kristall shouldn't be trying
to build cmark, as it's a library, it should just be linking against
it. Therefore, you shouldn't need to keep the .h.in files.
Making kristall use cmark, rather than the copy in the kristall source
probably requires adapting/fixing src/kristall.pro.
It hopefully isn't that difficult, but I don't know what this .pro file
is, it also looks pretty odd in parts, especially the references to
/home/felix/... !
It doesn't look like the copy of cmark in the kristall source has been
modified much, which also raises the question of why there is a copy of
the cmark source inside kristall?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-10-26 16:43 ` Christopher Baines
@ 2020-10-26 18:12 ` Nicolò Balzarotti
2020-10-27 13:22 ` Nicolò Balzarotti
0 siblings, 1 reply; 11+ messages in thread
From: Nicolò Balzarotti @ 2020-10-26 18:12 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44191, nicolo
Just linking to it would be easier. However, the file markdownrenderer
requires access to implementation details of the struct cmark_node
(it includes the file node.h, which is not installed by cmark, and fails
with: ../src/renderers/markdownrenderer.cpp:83:23: error: invalid use of incomplete type ‘const cmark_node {aka const struct cmark_node}’)
I replaced references such as `node.as.heading.level` to
`cmark_node_get_heading_level(node)` and so on. I could compile it (by
also adding -I/gnu/store and -lcmark to the build process), and markdown
seems to be working (tested here
gemini://tilde.team/~supernova/blog/this-is-a-test-of-using-markdown.md).
I'm going to send a patch to the author, linking to this mail exchange.
I'll let you know.
Christopher Baines <mail@cbaines.net> writes:
> Nicolò Balzarotti <anothersms@gmail.com> writes:
>
>> 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 sure if it's
>> a patched version or if it's an older one. But I can investigate
>> probably
>
> I think you might be overcomplicating this. kristall shouldn't be trying
> to build cmark, as it's a library, it should just be linking against
> it. Therefore, you shouldn't need to keep the .h.in files.
>
> Making kristall use cmark, rather than the copy in the kristall source
> probably requires adapting/fixing src/kristall.pro.
>
> It hopefully isn't that difficult, but I don't know what this .pro file
> is, it also looks pretty odd in parts, especially the references to
> /home/felix/... !
>
> It doesn't look like the copy of cmark in the kristall source has been
> modified much, which also raises the question of why there is a copy of
> the cmark source inside kristall?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-10-26 18:12 ` Nicolò Balzarotti
@ 2020-10-27 13:22 ` Nicolò Balzarotti
2020-10-31 20:26 ` Christopher Baines
0 siblings, 1 reply; 11+ messages in thread
From: Nicolò Balzarotti @ 2020-10-27 13:22 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44191, nicolo
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Hi!
The PR has been merged (so now I can link to cmark just fine).
Find attached the new patches.
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
Note on fonts: I'm using pre-built ttf as I'm not able to build them
(lot of javascript required)
Let me know!
Nicolò
[-- Attachment #2: 0001-gnu-Add-font-openmoji.patch --]
[-- Type: text/x-patch, Size: 1980 bytes --]
From 4fc57649d12f0ef6e3e5b1c01ce0e2ff5a4382e1 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 27 Oct 2020 14:10:06 +0100
Subject: [PATCH 1/2] gnu: Add font-openmoji
* gnu/packages/fonts.scm (font-openmoji): New variable.
---
gnu/packages/fonts.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index f39c529beb..8982551dda 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -37,6 +37,7 @@
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2020 Simen Endsjø <simendsjo@gmail.com>
;;; Copyright © 2020 Tim Van den Langenbergh <tmt_vdl@gmx.com>
+;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1430,6 +1431,30 @@ emphasis while still being readable.")
(define-public font-open-dyslexic
(deprecated-package "font-open-dyslexic" font-opendyslexic))
+(define-public font-openmoji
+ (package
+ (name "font-openmoji")
+ (version "12.4.0")
+ (source
+ (origin
+ (method url-fetch/zipbomb)
+ (uri
+ ;; It's also possible to build openmoji from source, but requires
+ ;; hundreds of libraries still not available in guix
+ (string-append "https://github.com/hfg-gmuend/openmoji/"
+ "releases/download/" version
+ "/openmoji-font.zip"))
+ (sha256
+ (base32
+ "0wvvg5vnc950h8v23wfgjyi7rv89mgm5hqq6viqv0bxcc3azglxb"))))
+ (build-system font-build-system)
+ (native-inputs `(("unzip" ,unzip)))
+ (home-page "https://openmoji.org")
+ (synopsis "Emojis for designers, developers and everyone else")
+ (description "OpenMoji provides emojis for designers, developers and
+everyone else.")
+ (license license:cc-by-sa4.0)))
+
(define-public font-dosis
(package
(name "font-dosis")
--
2.28.0
[-- Attachment #3: 0002-gnu-Add-kristall.patch --]
[-- Type: text/x-patch, Size: 5792 bytes --]
From 23527b87e86dbbf92c37718dc449d8ad0a8d3758 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 27 Oct 2020 14:18:23 +0100
Subject: [PATCH 2/2] gnu: Add kristall.
* gnu/packages/web-browsers.scm (kristall): New variable.
---
gnu/packages/web-browsers.scm | 99 +++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index eb49a8fdea..30bc9ca9cf 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -46,6 +46,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 +61,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 +343,103 @@ access.")
(properties `((lint-hidden-cve . ("CVE-2016-9179"))))
(license license:gpl2)))
+(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")))
+ (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))))
+ (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=" %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
+ (lambda _
+ ;; configure.ac relies on ‘git --describe’ to get the version.
+ ;; Patch it to just return the real version number directly.
+ (substitute* "src/kristall.pro"
+ (("(KRISTALL_VERSION=).*" _ match)
+ (string-append match ,version "\n")))))
+ (add-before 'build 'replace-bundled-cmark
+ (lambda _
+ (substitute* "src/kristall.pro"
+ (("(^include\\(.*cmark.*)" _ match)
+ (string-append
+ "LIBS += -I" (assoc-ref %build-inputs "cmark") " -lcmark")))
+ (substitute* "src/renderers/markdownrenderer.cpp"
+ (("(include.*node.*)" _ match)
+ (string-append "// " match)))))
+ (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))
+ (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 interface
+and more.")
+ (license license:gpl3))))
+
(define-public qutebrowser
(package
(name "qutebrowser")
--
2.28.0
[-- Attachment #4: Type: text/plain, Size: 2319 bytes --]
Nicolò Balzarotti <anothersms@gmail.com> writes:
> Just linking to it would be easier. However, the file markdownrenderer
> requires access to implementation details of the struct cmark_node
> (it includes the file node.h, which is not installed by cmark, and fails
> with: ../src/renderers/markdownrenderer.cpp:83:23: error: invalid use of incomplete type ‘const cmark_node {aka const struct cmark_node}’)
>
> I replaced references such as `node.as.heading.level` to
> `cmark_node_get_heading_level(node)` and so on. I could compile it (by
> also adding -I/gnu/store and -lcmark to the build process), and markdown
> seems to be working (tested here
> gemini://tilde.team/~supernova/blog/this-is-a-test-of-using-markdown.md).
>
> I'm going to send a patch to the author, linking to this mail exchange.
>
> I'll let you know.
>
> Christopher Baines <mail@cbaines.net> writes:
>
>> Nicolò Balzarotti <anothersms@gmail.com> writes:
>>
>>> 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 sure if it's
>>> a patched version or if it's an older one. But I can investigate
>>> probably
>>
>> I think you might be overcomplicating this. kristall shouldn't be trying
>> to build cmark, as it's a library, it should just be linking against
>> it. Therefore, you shouldn't need to keep the .h.in files.
>>
>> Making kristall use cmark, rather than the copy in the kristall source
>> probably requires adapting/fixing src/kristall.pro.
>>
>> It hopefully isn't that difficult, but I don't know what this .pro file
>> is, it also looks pretty odd in parts, especially the references to
>> /home/felix/... !
>>
>> It doesn't look like the copy of cmark in the kristall source has been
>> modified much, which also raises the question of why there is a copy of
>> the cmark source inside kristall?
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-10-27 13:22 ` Nicolò Balzarotti
@ 2020-10-31 20:26 ` Christopher Baines
2020-11-03 10:14 ` Nicolò Balzarotti
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Baines @ 2020-10-31 20:26 UTC (permalink / raw)
To: Nicolò Balzarotti; +Cc: 44191, nicolo
[-- Attachment #1: Type: text/plain, Size: 7541 bytes --]
Nicolò Balzarotti <anothersms@gmail.com> 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=?
(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=" %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 ‘git --describe’ to get the version.
+ ;; Patch it to just return the real version number directly.
+ (substitute* "src/kristall.pro"
+ (("(KRISTALL_VERSION=).*" _ 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 += -I" (assoc-ref %build-inputs "cmark") " -lcmark")))
+ (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 interface
+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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-10-31 20:26 ` Christopher Baines
@ 2020-11-03 10:14 ` Nicolò Balzarotti
2020-11-10 19:57 ` Christopher Baines
0 siblings, 1 reply; 11+ messages in thread
From: Nicolò Balzarotti @ 2020-11-03 10:14 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44191, nicolo
Hi!
Christopher Baines <mail@cbaines.net> 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'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.
Let me know and thanks again,
Nicolò
[1] https://unicode.org/Public/emoji/1.0/emoji-data.txt
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-11-03 10:14 ` Nicolò Balzarotti
@ 2020-11-10 19:57 ` Christopher Baines
2020-11-14 14:52 ` Nicolò Balzarotti
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Baines @ 2020-11-10 19:57 UTC (permalink / raw)
To: Nicolò Balzarotti; +Cc: 44191, nicolo
[-- Attachment #1: Type: text/plain, Size: 2267 bytes --]
Nicolò Balzarotti <anothersms@gmail.com> writes:
> Christopher Baines <mail@cbaines.net> 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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#44191] gnu: Add kristall
2020-11-10 19:57 ` Christopher Baines
@ 2020-11-14 14:52 ` Nicolò Balzarotti
2020-11-14 16:23 ` bug#44191: " Christopher Baines
0 siblings, 1 reply; 11+ messages in thread
From: Nicolò Balzarotti @ 2020-11-14 14:52 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44191, nicolo
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
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ò
[-- Attachment #2: v2-0001-gnu-Add-kristall.patch --]
[-- Type: text/x-patch, Size: 6945 bytes --]
From 08f2cf3033d763ffc0c753bbb7817cdb5484f362 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
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 © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; 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)))
+(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=?
+ (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=" %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 ‘git --describe’ to get the version.
+ ;; Patch it to just return the real version number directly.
+ (substitute* "src/kristall.pro"
+ (("(KRISTALL_VERSION=).*" _ 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 += -I" (assoc-ref %build-inputs "cmark") " -lcmark")))
+ #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")
--
2.29.2
[-- Attachment #3: Type: text/plain, Size: 2380 bytes --]
Christopher Baines <mail@cbaines.net> writes:
> Nicolò Balzarotti <anothersms@gmail.com> writes:
>
>> Christopher Baines <mail@cbaines.net> 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.
^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#44191: gnu: Add kristall
2020-11-14 14:52 ` Nicolò Balzarotti
@ 2020-11-14 16:23 ` Christopher Baines
0 siblings, 0 replies; 11+ messages in thread
From: Christopher Baines @ 2020-11-14 16:23 UTC (permalink / raw)
To: Nicolò Balzarotti; +Cc: 44191-done, nicolo
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
Nicolò Balzarotti <anothersms@gmail.com> writes:
> 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, I've gone ahead and pushed this as
199ebb12981e13a1a29501276bcb1675a53080b6.
I did tweak the commit/hash for kristall, as I got a hash mismatch when
trying to build locally, and when I fixed that, I got a cmark related
compilation failure I think. I used a later commit to avoid this.
I also tweaked the breeze stylesheet input, making it a native-input
(just because it's only used at build time), and changed the file-name
so it doesn't use the same one as the kristall checkout.
Thanks again,
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-11-14 16:24 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-24 13:07 [bug#44191] gnu: Add kristall Nicolò Balzarotti
2020-10-25 9:47 ` Christopher Baines
2020-10-25 16:47 ` Nicolò Balzarotti
2020-10-26 16:43 ` Christopher Baines
2020-10-26 18:12 ` Nicolò Balzarotti
2020-10-27 13:22 ` Nicolò Balzarotti
2020-10-31 20:26 ` Christopher Baines
2020-11-03 10:14 ` Nicolò Balzarotti
2020-11-10 19:57 ` Christopher Baines
2020-11-14 14:52 ` Nicolò Balzarotti
2020-11-14 16:23 ` bug#44191: " Christopher Baines
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.