projects/guix·blob kernel-updates · refs

514 lines · 19.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 John Darringon <[email protected]>
3;;; Copyright © 2016, 2020, 2021 Efraim Flashner <[email protected]>
4;;; Copyright © 2017 Hartmut Goebel <[email protected]>
5;;; Copyright © 2018, 2019, 2022 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2019 Guillaume Le Vaillant <[email protected]>
7;;; Copyright © 2020 Vinicius Monego <[email protected]>
8;;; Copyright © 2020 Leo Famulari <[email protected]>
9;;; Copyright © 2023 Ricardo Wurmus <[email protected]>
10;;; Copyright © 2024 Nicolas Graves <[email protected]>
11;;; Copyright © 2024, 2025 Janneke Nieuwenhuizen <[email protected]>
12;;; Copyright © 2025 Maxim Cournoyer <[email protected]>
13;;; Copyright © 2026 Orahcio Felício de Sousa <[email protected]>
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages aidc)
31 #:use-module (gnu packages)
32 #:use-module (guix gexp)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix packages)
35 #:use-module (guix download)
36 #:use-module (guix git-download)
37 #:use-module (guix utils)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages elf)
42 #:use-module (gnu packages imagemagick)
43 #:use-module (gnu packages gettext)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages golang-build)
46 #:use-module (gnu packages golang-xyz)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages image)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages python-xyz)
53 #:use-module (gnu packages python-build)
54 #:use-module (gnu packages pretty-print)
55 #:use-module (gnu packages qt)
56 #:use-module (gnu packages video)
57 #:use-module (guix build-system cmake)
58 #:use-module (guix build-system pyproject)
59 #:use-module (guix build-system qt)
60 #:use-module (guix build-system gnu)
61 #:use-module (guix build-system go)
62 #:use-module (guix build-system glib-or-gtk))
63
64(define-public python-pyzbar
65 (package
66 (name "python-pyzbar")
67 (version "0.1.9")
68 (source
69 (origin
70 (method git-fetch)
71 (uri (git-reference
72 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
73 (commit (string-append "v" version))))
74 (file-name (git-file-name name version))
75 (sha256
76 (base32 "1df1dvr8i2wyr2vw5pq8rlz2wm4xqda0wbgja19bvql1m9im11ph"))))
77 (build-system pyproject-build-system)
78 (arguments
79 (list
80 #:test-flags
81 ;; This tests if find_library was called once, but we remove the call in
82 ;; the stage below to make the library find libzbar.
83 #~(list #$@(map (lambda (test) (string-append "--deselect="
84 "pyzbar/tests/"
85 "test_zbar_library.py::"
86 "TestLoad::"
87 test))
88 (list "test_found_non_windows"
89 "test_not_found_non_windows")))
90 #:phases
91 #~(modify-phases %standard-phases
92 (add-before 'build 'set-library-file-name
93 (lambda* (#:key inputs #:allow-other-keys)
94 (substitute* "pyzbar/zbar_library.py"
95 (("find_library\\('zbar'\\)")
96 (format #f "~s"
97 (search-input-file inputs "/lib/libzbar.so.0")))))))))
98 (native-inputs
99 (list pkg-config
100 python-numpy
101 python-pillow
102 python-pytest
103 python-setuptools))
104 (inputs
105 (list zbar))
106 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
107 (synopsis "Read one-dimensional barcodes and QR codes")
108 (description
109 "Read one-dimensional barcodes and QR codes using the zbar library.
110
111Features:
112
113@itemize
114@item Pure python
115@item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
116@item Decodes locations of barcodes
117@item No dependencies, other than the zbar library itself
118@end itemize")
119 (license license:expat)))
120
121(define-public python-zbarlight
122 (package
123 (name "python-zbarlight")
124 (version "4.0")
125 (source
126 (origin
127 (method git-fetch)
128 (uri (git-reference
129 (url "https://github.com/Polyconseil/zbarlight")
130 (commit version)))
131 (file-name (git-file-name name version))
132 (sha256
133 (base32 "1q1nfc7g7bl9y63fwvnq1fcgqk79inc2hhw3ilvyw0nk0g74v8cm"))))
134 (build-system pyproject-build-system)
135 (propagated-inputs (list python-pillow))
136 (inputs (list zbar))
137 (native-inputs (list python-pytest python-setuptools))
138 (home-page "https://github.com/Polyconseil/zbarlight")
139 (synopsis "Simple Python wrapper for the zbar barcode library")
140 (description "Zbarlight is a simple wrapper for the zbar library. It can
141read all zbar supported codes.")
142 (license license:bsd-3)))
143
144(define-public zint
145 (package
146 (name "zint")
147 (version "2.16.0")
148 (source (origin
149 (method git-fetch)
150 (uri (git-reference
151 (url "https://github.com/zint/zint")
152 (commit version)))
153 (file-name (git-file-name name version))
154 (sha256
155 (base32
156 "1zpv9ar1kfjl3bb27jc8hd8601zcda9yv4dz1jhxfhdsg6v4cdg7"))))
157 (build-system cmake-build-system)
158 (arguments
159 (list #:disallowed-references (list qtbase)
160 #:parallel-tests? #f ;test suite fails otherwise
161 #:configure-flags #~(list "-DZINT_TEST=ON"
162 "-DZINT_UNINSTALL=OFF")))
163 (native-inputs (list pkg-config))
164 (inputs (list libpng))
165 (synopsis "Barcode encoding library")
166 (description "Zint is a suite of programs to allow easy encoding of data in
167any of the wide range of public domain barcode standards and to allow
168integration of this capability into your own programs.")
169 (home-page "https://www.zint.org.uk/")
170 (license (list license:bsd-3 license:gpl3+))))
171
172(define-public zint-with-qt
173 (package/inherit zint
174 (name "zint-with-qt")
175 (build-system qt-build-system)
176 (arguments (substitute-keyword-arguments arguments
177 ((#:disallowed-references references)
178 (delete qtbase references))
179 ((#:qtbase _ #f)
180 qtbase)
181 ((#:configure-flags flags ''())
182 #~(cons "-DZINT_QT6=ON" #$flags))))
183 (inputs (modify-inputs inputs
184 ;; The UI library of qttools is linked to; hence it must be used
185 ;; as an input rather than a native input.
186 (append qtsvg qttools)))
187 (synopsis "Barcode encoding library (with graphical user interface)")))
188
189(define-public zxing-cpp
190 (package
191 (name "zxing-cpp")
192 (version "2.3.0")
193 (source (origin
194 (method git-fetch)
195 (uri (git-reference
196 (url "https://github.com/zxing-cpp/zxing-cpp")
197 (commit (string-append "v" version))))
198 (file-name (git-file-name name version))
199 (sha256
200 (base32
201 "1hdr73fllnsp3zpmrhw6cjla39lihwg1khgvddsf4v57a0lmiy3f"))))
202 (build-system cmake-build-system)
203 (arguments
204 (list
205 #:configure-flags
206 #~(list "-DZXING_READERS=ON"
207 "-DZXING_WRITERS=BOTH"
208 "-DZXING_DEPENDENCIES=LOCAL"
209 "-DZXING_EXAMPLES=OFF" ;requires stb.pc
210 "-DZXING_USE_BUNDLED_ZINT=OFF"
211 "-DZXING_UNIT_TESTS=ON")
212 #:phases
213 #~(modify-phases %standard-phases
214 (add-after 'install 'install-headers
215 (lambda* (#:key source #:allow-other-keys)
216 (invoke "sh" "-c"
217 (string-append "cp " source "/core/src/*.h "
218 #$output "/include/ZXing/")))))))
219 (native-inputs (list googletest pkg-config))
220 (inputs (list libpng zint zlib))
221 (synopsis "C++ port of ZXing")
222 (description "ZXing-CPP is a barcode scanning library.")
223 (home-page "https://github.com/zxing-cpp/zxing-cpp")
224 (license license:asl2.0)))
225
226(define-public barcode
227 (package
228 (name "barcode")
229 (version "0.99")
230 (source (origin
231 (method url-fetch)
232 (uri (string-append "mirror://gnu/barcode/barcode-"
233 version ".tar.xz"))
234 (sha256
235 (base32
236 "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"))))
237 (build-system gnu-build-system)
238 (arguments
239 ;; Fix build with GCC 10.
240 '(#:configure-flags '("CFLAGS=-fcommon")))
241 (synopsis "Convert text strings to printed bars in various standards")
242 (description "GNU Barcode is a flexible tool to produce printed barcodes
243from text strings. It supports a variety of encoding standards and sizing
244measurements. Barcodes can be output in PostScript or Encapsulated PostScript
245formats.")
246 (license license:gpl3+)
247 (home-page "https://www.gnu.org/software/barcode/")))
248
249(define-public qrencode
250 (package
251 (name "qrencode")
252 (version "4.1.1")
253 (source (origin
254 (method url-fetch)
255 (uri (string-append "https://fukuchi.org/works/qrencode/"
256 "qrencode-" version ".tar.bz2"))
257 (sha256
258 (base32
259 "08v9d8jn26bva2a8x4hghq3mgl8zcid393iqkidwyhc05xrxjmg4"))))
260 (build-system gnu-build-system)
261 (arguments
262 `(#:configure-flags '("--with-tests")
263 #:phases
264 (modify-phases %standard-phases
265 (replace 'check
266 (lambda* (#:key tests? #:allow-other-keys)
267 (when tests?
268 (with-directory-excursion "tests"
269 (invoke "./test_basic.sh")))
270 #t)))))
271 (inputs (list libpng))
272 (native-inputs (list pkg-config))
273 (synopsis "Encode data into a QR Code symbol")
274 (description "Libqrencode is a C library for encoding data in a QR Code
275symbol, a kind of 2D symbology that can be scanned by handy terminals such as
276a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000
277characters, and is highly robust.")
278 (license license:lgpl2.1+)
279 (home-page "https://fukuchi.org/works/qrencode")))
280
281(define-public go-github-com-mdp-qrterminal
282 (package
283 (name "go-github-com-mdp-qrterminal")
284 (version "1.0.1")
285 (source
286 (origin
287 (method git-fetch)
288 (uri (git-reference
289 (url "https://github.com/mdp/qrterminal")
290 (commit (string-append "v" version))))
291 (file-name (git-file-name name version))
292 (sha256
293 (base32 "1f2zrdv9sw2a6ni1712d27cayr3f8whqagx6f0yglc5gdd9f3i2n"))))
294 (build-system go-build-system)
295 (arguments
296 (list
297 #:import-path "github.com/mdp/qrterminal"))
298 (propagated-inputs (list go-rsc-io-qr))
299 (home-page "https://github.com/mdp/qrterminal")
300 (synopsis "QR codes in your terminal")
301 (description
302 "Golang library for generating QR codes in the terminal. Originally this
303was a port of the NodeJS version. Recently it's been updated to allow for
304smaller code generation using ASCII 'half blocks'.")
305 (license license:expat)))
306
307(define-public go-github-com-mdp-qrterminal-v3
308 (package
309 (name "go-github-com-mdp-qrterminal-v3")
310 (version "3.2.1")
311 (source
312 (origin
313 (method git-fetch)
314 (uri (git-reference
315 (url "https://github.com/mdp/qrterminal")
316 (commit (string-append "v" version))))
317 (file-name (git-file-name name version))
318 (sha256
319 (base32 "078669ngq4gzkdngb80s8fck7fnin02jxbz8q0cz698jfwxng91s"))))
320 (build-system go-build-system)
321 (arguments
322 (list
323 #:import-path "github.com/mdp/qrterminal/v3"))
324 (native-inputs
325 (list go-github-com-mattn-go-colorable))
326 (propagated-inputs
327 (list go-golang-org-x-term go-rsc-io-qr))
328 (home-page "https://github.com/mdp/qrterminal")
329 (synopsis "Render QR codes in terminals")
330 (description
331 "This package provides a Go library for rendering QR codes in terminals.")
332 (license license:expat)))
333
334(define-public go-rsc-io-qr
335 (package
336 (name "go-rsc-io-qr")
337 ;; 0.2.0 (2018-06-05); the latest changes are from <2022-04-17>.
338 (properties '((commit . "b6857d426aa506d5bf7efb8f73928d72bcf4e73d")
339 (revision . "0")))
340 (version (git-version "0.2.0"
341 (assoc-ref properties 'revision)
342 (assoc-ref properties 'commit)))
343 (source
344 (origin
345 (method git-fetch)
346 (uri (git-reference
347 (url "https://github.com/rsc/qr")
348 (commit (assoc-ref properties 'commit))))
349 (file-name (git-file-name name version))
350 (sha256
351 (base32 "180njqm6q1yilfknagi862321gq6b9hi27wp8s6v7qxwb5hd5ps1"))))
352 (build-system go-build-system)
353 (arguments
354 (list
355 #:import-path "rsc.io/qr"
356 ;; See: <https://github.com/rsc/qr/issues/5>.
357 #:test-flags #~(list "-skip" "TestVersion")))
358 (propagated-inputs
359 (list qrencode))
360 (home-page "https://github.com/rsc/qr")
361 (synopsis "Basic QR encoder")
362 (description "Package @code{qr} encodes QR codes.")
363 (license license:bsd-3)))
364
365(define-public libdmtx
366 (package
367 (name "libdmtx")
368 (version "0.7.7")
369 (source
370 (origin
371 (method git-fetch)
372 (uri (git-reference
373 (url "https://github.com/dmtx/libdmtx")
374 (commit (string-append "v" version))))
375 (file-name (git-file-name name version))
376 (sha256
377 (base32 "0s95gplvb6x7gnl48yn7ywa9r15lfm8k2m60wm9i7w75ay4bq32i"))))
378 (build-system gnu-build-system)
379 (arguments
380 (list #:configure-flags
381 #~(list "--disable-static")))
382 (native-inputs
383 (list autoconf automake libtool pkg-config))
384 (home-page "https://github.com/dmtx")
385 (synopsis "Library for reading and writing Data Matrix 2D barcodes")
386 (description "libdmtx is software for reading and writing Data Matrix 2D
387barcodes of the modern ECC200 variety. libdmtx is a shared library, allowing
388C/C++ programs to use its capabilities without restrictions or overhead.")
389 (license license:bsd-3)))
390
391(define-public dmtx-utils
392 (package
393 (name "dmtx-utils")
394 (version "0.7.6")
395 (source
396 (origin
397 (method git-fetch)
398 (uri (git-reference
399 (url "https://github.com/dmtx/dmtx-utils/")
400 (commit (string-append "v" version))))
401 (file-name (git-file-name name version))
402 (sha256
403 "06m3qncqdlcnmw83n95yrx2alaq6bld320ax26z4ndnla41yk0p4")))
404 (build-system gnu-build-system)
405 (native-inputs (list autoconf automake libtool pkg-config))
406 (inputs (list libdmtx imagemagick libjpeg-turbo))
407 (home-page "https://github.com/dmtx/dmtx-utils/")
408 (synopsis "Utilities for working with Data Matrix barcodes")
409 (description
410 "libdmtx is a software library that enables programs to read and write Data
411Matrix barcodes of the modern ECC200 variety. This package, dmtx-utils,
412provides command line utilities that allow scripts and command line users to
413use libdmtx functionality.
414
415This package includes the following programs:
416@enumerate
417@item @code{dmtxquery}: Extract information from dmtxread output.
418@item @code{dmtxread}: Scan Data Matrix barcodes.
419@item @code{dmtxwrite}: Create Data Matrix barcodes.
420@end enumerate")
421 (license (list license:lgpl2.1 license:gpl2))))
422
423;; XXX: qt variant utils are broken: zbarcam-qt fails with segmentation fault.
424(define-public zbar
425 (package
426 (name "zbar")
427 (version "0.23.93")
428 (source
429 (origin
430 (method git-fetch)
431 (uri
432 (git-reference
433 (url "https://github.com/mchehab/zbar")
434 (commit version)))
435 (file-name (git-file-name name version))
436 (sha256
437 (base32 "0x71clkkm4w765c2d5h3svr29w08dj03r6785f9jwqx5r4ral0za"))))
438 (build-system glib-or-gtk-build-system)
439 (arguments
440 (list
441 #:configure-flags
442 #~(list "--disable-static"
443 "--without-dbus" ;See <https://github.com/mchehab/zbar/issues/104>
444 "--with-gtk=auto"
445 "--with-python=auto")))
446 (native-inputs
447 (list autoconf
448 automake
449 gettext-minimal
450 `(,glib "bin")
451 gobject-introspection
452 libtool
453 patchelf
454 pkg-config
455 python-wrapper))
456 (inputs
457 (list imagemagick
458 libjpeg-turbo
459 perl
460 python
461 v4l-utils))
462 (propagated-inputs
463 ;; These are in 'requires' field of .pc files.
464 (list glib gtk+))
465 (synopsis "Bar code reader")
466 (description
467 "ZBar can read barcodes from various sources, such as video streams,
468image files, and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E,
469EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ
470Code. Included with the library are basic applications for decoding captured
471bar code images and using a video device (e.g. webcam) as a bar code scanner.
472For application developers, language bindings are included for C, C++ and
473Python as well as GUI widgets for GTK and Qt.")
474 (home-page "https://github.com/mchehab/zbar")
475 (license license:lgpl2.1+)))
476
477(define-public zbar-minimal
478 (package/inherit zbar
479 (name "zbar-minimal")
480 (build-system gnu-build-system)
481 (arguments
482 (substitute-keyword-arguments arguments
483 ((#:configure-flags flags)
484 #~(cons* "--with-gtk=no" (delete "--with-gtk=auto" #$flags)))
485 ((#:disallowed-references _ '())
486 (list qtbase gtk+))))
487 (propagated-inputs
488 (modify-inputs propagated-inputs
489 (delete "gtk+")))))
490
491(define-public qrcodegen-cpp
492 (package
493 (name "qrcodegen-cpp")
494 (version "1.8.0")
495 (source (origin
496 (method git-fetch)
497 (uri (git-reference
498 (url "https://github.com/nayuki/QR-Code-generator")
499 (commit (string-append "v" version))))
500 (file-name (git-file-name name version))
501 (patches (search-patches "qrcodegen-cpp-cmake.patch"))
502 (sha256
503 (base32
504 "0dk9ci5gchxa8gh0hyhlj3d5jwxqlnfm85xyp791ldaia14bkj39"))))
505 (build-system cmake-build-system)
506 (arguments
507 (list #:configure-flags
508 #~'("-DBUILD_TESTS=ON"
509 "-DBUILD_SHARED_LIBS=ON")))
510 (synopsis "QR Code generator library")
511 (description "qrcodegen-cpp is a QR code generator library in C++. The
512project also offers Java, Javascript, Python, C, and Rust implementations.")
513 (home-page "https://www.nayuki.io/page/qr-code-generator-library")
514 (license license:expat)))