summaryrefslogtreecommitdiffstats
path: root/src/jd
diff options
context:
space:
mode:
authorJakub Dlugosz <me@jdlugosz.com>2025-10-31 13:16:43 +0100
committerJakub Dlugosz <me@jdlugosz.com>2025-10-31 13:16:43 +0100
commitaff3bf8cbf35e90afbcfdedd8909d6e9469532d0 (patch)
tree56dc48a65058d9376f44edfc2f19039ae742e754 /src/jd
parent05067670476f839100fbb98b77284ddbf8e5adc4 (diff)
downloaddotfiles-aff3bf8cbf35e90afbcfdedd8909d6e9469532d0.tar.gz
dotfiles-aff3bf8cbf35e90afbcfdedd8909d6e9469532d0.zip
Add supernote-tool package and apply it to user config
Diffstat (limited to 'src/jd')
-rw-r--r--src/jd/packages/python.scm170
-rw-r--r--src/jd/packages/supernote.scm48
-rw-r--r--src/jd/user.scm11
3 files changed, 225 insertions, 4 deletions
diff --git a/src/jd/packages/python.scm b/src/jd/packages/python.scm
new file mode 100644
index 0000000..659a5ba
--- /dev/null
+++ b/src/jd/packages/python.scm
@@ -0,0 +1,170 @@
1(define-module (jd packages python)
2 #:use-module (gnu packages fontutils)
3 #:use-module (gnu packages gtk)
4 #:use-module (gnu packages python)
5 #:use-module (gnu packages python-build)
6 #:use-module (gnu packages python-web)
7 #:use-module (gnu packages python-xyz)
8 #:use-module (gnu packages xml)
9
10 #:use-module (guix build-system pyproject)
11 #:use-module (guix build-system python)
12
13 #:use-module (guix git-download)
14 #:use-module (guix hg-download)
15 #:use-module ((guix licenses) #:prefix license:)
16 #:use-module (guix packages))
17
18(define-public python-svgwrite
19 (package
20 (name "python-svgwrite")
21 (version "1.4.3")
22 (source
23 (origin
24 (method git-fetch)
25 (uri (git-reference
26 (url "https://github.com/mozman/svgwrite")
27 (commit "cd10a7ed1982de77ba85ff4556e154187d7f14bc")))
28 (file-name (git-file-name name version))
29 (sha256
30 (base32 "14nvgsdhndpsgqlcp1vbmczd7rfyiddhjav2xja0a0rx2472psxq"))))
31 (build-system python-build-system)
32 (arguments
33 (list
34 #:tests? #f))
35 (home-page "https://github.com/mozman/svgwrite")
36 (synopsis "Library to create SVG drawings using Python")
37 (description
38 "Svgwrite is a pure-Python library for creating Scalable Vector Graphics (SVG)
39files. It provides an object-oriented interface to build SVG drawings programmatically
40without external dependencies. The library supports shapes, paths, gradients, and
41style definitions compliant with the SVG 1.1 specification.")
42 (license license:expat)))
43
44(define-public python-rlpycairo
45 (package
46 (name "python-rlpycairo")
47 (version "0.4.0")
48 (source
49 (origin
50 (method hg-fetch)
51 (uri (hg-reference
52 (url "https://hg.reportlab.com/hg-public/rlPyCairo")
53 (changeset "a3e9ae26d82d")))
54 (file-name (git-file-name name version))
55 (sha256
56 (base32 "0c8px1538zwdr9hjhscv6y6k8mzlrr247f2jbsdjm4qfijchlc7n"))))
57 (build-system pyproject-build-system)
58 (arguments
59 (list
60 #:tests? #f)) ; brak zestawu testów
61 (propagated-inputs
62 (list python-pycairo
63 python-freetype-py
64 python-reportlab))
65 (native-inputs
66 (list python-setuptools
67 python-wheel))
68 (home-page "https://hg.reportlab.com/hg-public/rlPyCairo")
69 (synopsis "Cairo rendering plugin backend for ReportLab")
70 (description
71 "rlPyCairo is a ReportLab plugin that provides a Cairo-based rendering
72backend for the @code{reportlab.graphics.renderPM} module. It enables the
73use of the PyCairo library for high-quality vector and raster rendering and
74extends ReportLab's graphical output capabilities.")
75 (license license:bsd-3)))
76
77(define-public python-svglib
78 (package
79 (name "python-svglib")
80 (version "1.6.0")
81 (source
82 (origin
83 (method git-fetch)
84 (uri (git-reference
85 (url "https://github.com/deeplook/svglib")
86 (commit "1f41cc64b9b56b0868d775cdeaee0c5413abbb41")))
87 (file-name (git-file-name name version))
88 (sha256
89 (base32 "1qpn4gxfvzb326rwjz0xrrgz7r51pm1cw5xmzwjndhm6mxjbxayq"))))
90 (build-system pyproject-build-system)
91 (arguments
92 (list
93 #:tests? #f))
94 (propagated-inputs
95 (list python-cssselect2
96 python-lxml
97 python-reportlab
98 python-rlpycairo
99 python-tinycss2))
100 (native-inputs
101 (list python-hatchling))
102 (home-page "https://github.com/deeplook/svglib")
103 (synopsis "Pure-Python library for reading and converting SVG")
104 (description
105 "SVGLib is a pure-Python library for parsing and converting SVG (Scalable Vector Graphics)
106files into PDF and other vector formats. It relies on ReportLab for PDF generation
107and supports modern CSS and XML standards. It can be used both as a library and via
108its command-line tool @code{svg2pdf}.")
109 (license license:lgpl3+)))
110
111(define-public python-reportlab
112 (package
113 (name "python-reportlab")
114 (version "4.4.0")
115 (source
116 (origin
117 (method hg-fetch)
118 (uri (hg-reference
119 (url "https://hg.reportlab.com/hg-public/reportlab")
120 (changeset "7635eaecb27d")))
121 (file-name (git-file-name name version))
122 (sha256
123 (base32 "0pmgms62khyjka3gj9y1f33vmlqgyzz1d4wlq3ysksdgxpn6hmcf"))))
124 (build-system pyproject-build-system)
125 (arguments
126 (list
127 #:tests? #f))
128 (propagated-inputs
129 (list python-pillow
130 python-charset-normalizer))
131 (native-inputs
132 (list python-setuptools
133 python-wheel))
134 (home-page "https://www.reportlab.com/")
135 (synopsis "Toolkit for generating PDFs and vector graphics in Python")
136 (description
137 "The ReportLab Toolkit is a mature, open-source library for generating
138PDF documents and vector graphics directly from Python code. It provides
139high-level APIs for document layout, charts, barcodes, and graphics
140composition, used in both open source and commercial applications.")
141 (license license:bsd-3)))
142
143(define-public python-potracer
144 (package
145 (name "python-potracer")
146 (version "0.0.4")
147 (source
148 (origin
149 (method git-fetch)
150 (uri (git-reference
151 (url "https://github.com/tatarize/potrace")
152 (commit "769eadc85ab2ae6c3334686eaab0296fdfdf6abc")))
153 (file-name (git-file-name name version))
154 (sha256
155 (base32 "0g5q2klz2r5spidzhk70y2jkg10yic2ka7j5ygks1sp6nrnhac9v"))))
156 (build-system pyproject-build-system)
157 (propagated-inputs
158 (list python-numpy))
159 (native-inputs (list python-setuptools))
160 (arguments
161 (list
162 #:tests? #f))
163 (home-page "https://github.com/tatarize/potrace")
164 (synopsis "Python bindings for Potrace vectorization library")
165 (description
166 "Potracer is a Python wrapper for the Potrace vectorization library,
167allowing conversion of bitmap images into scalable vector graphics.
168It provides Pythonic access to path tracing and curve fitting
169functionalities from the original Potrace project.")
170 (license license:gpl2+)))
diff --git a/src/jd/packages/supernote.scm b/src/jd/packages/supernote.scm
new file mode 100644
index 0000000..921d0d1
--- /dev/null
+++ b/src/jd/packages/supernote.scm
@@ -0,0 +1,48 @@
1(define-module (jd packages supernote)
2 #:use-module (gnu packages python-build)
3 #:use-module (gnu packages python-xyz)
4
5 #:use-module (guix build-system pyproject)
6 #:use-module (guix git-download)
7 #:use-module ((guix licenses) #:prefix license:)
8 #:use-module (guix packages)
9
10 #:use-module (jd packages python))
11
12(define-public supernote-tool
13 (package
14 (name "supernote-tool")
15 (version "0.6.2")
16 (source
17 (origin
18 (method git-fetch)
19 (uri (git-reference
20 (url "https://github.com/jya-dev/supernote-tool")
21 (commit "73166ca4fbe23a50e188c212f7f1a8d30ce1ce66")))
22 (file-name (git-file-name name version))
23 (sha256
24 (base32 "1mzq6s8lwq3qnq3sbp2hwxkcy07j5izjf309wfx38g7ssd3b8mwd"))))
25 (build-system pyproject-build-system)
26 (arguments
27 (list
28 #:tests? #f))
29 (propagated-inputs
30 (list
31 python-colour
32 python-fusepy
33 python-numpy
34 python-pillow
35 python-potracer
36 python-pypng
37 python-reportlab
38 python-svglib
39 python-svgwrite))
40 (native-inputs
41 (list python-hatchling))
42 (home-page "https://github.com/jya-dev/supernote-tool")
43 (synopsis "An unofficial converter library for Ratta Supernote")
44 (description
45 "Supernotelib is an unofficial converter and utility library for Ratta Supernote
46devices, supporting conversion of note files, vector tracing, and export to
47standard formats like PDF and SVG.")
48 (license license:asl2.0)))
diff --git a/src/jd/user.scm b/src/jd/user.scm
index aff2b99..8f2ec7e 100644
--- a/src/jd/user.scm
+++ b/src/jd/user.scm
@@ -28,6 +28,7 @@
28 #:use-module (jd features nextcloud) 28 #:use-module (jd features nextcloud)
29 #:use-module (jd features shepherd) 29 #:use-module (jd features shepherd)
30 #:use-module (jd features state) 30 #:use-module (jd features state)
31 #:use-module (jd packages supernote)
31 32
32 #:use-module (nongnu packages linux) 33 #:use-module (nongnu packages linux)
33 #:use-module (nongnu system linux-initrd) 34 #:use-module (nongnu system linux-initrd)
@@ -429,9 +430,11 @@
429 (list 430 (list
430 (@ (gnu packages tree-sitter) tree-sitter-clojure) 431 (@ (gnu packages tree-sitter) tree-sitter-clojure)
431 (@ (gnu packages tree-sitter) tree-sitter-html)) 432 (@ (gnu packages tree-sitter) tree-sitter-html))
432 (strings->packages 433 (append
433 "figlet" 434 (list supernote-tool)
434 "calibre" 435 (strings->packages
436 "figlet"
437 "calibre"
435 438
436 "libnotify" 439 "libnotify"
437 440
@@ -462,7 +465,7 @@
462 "texlive-collection-fontsrecommended" 465 "texlive-collection-fontsrecommended"
463 "texlive-collection-pictures" 466 "texlive-collection-pictures"
464 "texlive-collection-latexextra" 467 "texlive-collection-latexextra"
465 "texlive-dvipng")))))) 468 "texlive-dvipng")))))))
466 469
467 470
468(define-public (feature-nonfree-kernel) 471(define-public (feature-nonfree-kernel)