projects/guix·blob kernel-updates · refs

6609 lines · 260.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012-2016, 2018, 2022 Ludovic Courtès <[email protected]>
3;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2025 Andreas Enge <[email protected]>
4;;; Copyright © 2013, 2017 Cyril Roelandt <[email protected]>
5;;; Copyright © 2014, 2016 David Thompson <[email protected]>
6;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <[email protected]>
7;;; Copyright © 2014, 2015 Eric Bavier <[email protected]>
8;;; Copyright © 2015, 2016 Sou Bunnbu <[email protected]>
9;;; Copyright © 2015 Leo Famulari <[email protected]>
10;;; Copyright © 2015 Eric Dvorsak <[email protected]>
11;;; Copyright © 2016, 2022 Hartmut Goebel <[email protected]>
12;;; Copyright © 2016 Christine Lemmer-Webber <[email protected]>
13;;; Copyright © 2015-2024 Efraim Flashner <[email protected]>
14;;; Copyright © 2016, 2017 Nikita <[email protected]>
15;;; Copyright © 2016, 2017, 2018 Roel Janssen <[email protected]>
16;;; Copyright © 2016 David Craven <[email protected]>
17;;; Copyright © 2016, 2024, 2025 Janneke Nieuwenhuizen <[email protected]>
18;;; Copyright © 2016 Andy Patterson <[email protected]>
19;;; Copyright © 2016 Danny Milosavljevic <[email protected]>
20;;; Copyright © 2016-2022 Marius Bakke <[email protected]>
21;;; Copyright © 2017, 2018 Julien Lepiller <[email protected]>
22;;; Copyright © 2017, 2020 Thomas Danckaert <[email protected]>
23;;; Copyright © 2017 Jelle Licht <[email protected]>
24;;; Copyright © 2017 Adriano Peluso <[email protected]>
25;;; Copyright © 2017, 2021 Arun Isaac <[email protected]>
26;;; Copyright © 2017–2022 Tobias Geerinckx-Rice <[email protected]>
27;;; Copyright © 2017, 2018 Alex Vong <[email protected]>
28;;; Copyright © 2017, 2018 Ben Woodcroft <[email protected]>
29;;; Copyright © 2017 Rutger Helling <[email protected]>
30;;; Copyright © 2017, 2018, 2019 Pierre Langlois <[email protected]>
31;;; Copyright © 2015, 2017, 2018, 2019, 2021-2026 Ricardo Wurmus <[email protected]>
32;;; Copyright © 2017 Kristofer Buffington <[email protected]>
33;;; Copyright © 2018 Amirouche Boubekki <[email protected]>
34;;; Copyright © 2018 Joshua Sierles, Nextjournal <[email protected]>
35;;; Copyright © 2018, 2021-2023, 2026 Maxim Cournoyer <[email protected]>
36;;; Copyright © 2019 Jack Hill <[email protected]>
37;;; Copyright © 2019 Alex Griffin <[email protected]>
38;;; Copyright © 2019 Gábor Boskovits <[email protected]>
39;;; Copyright © 2019, 2021, 2022 Guillaume Le Vaillant <[email protected]>
40;;; Copyright © 2020 Pierre Neidhardt <[email protected]>
41;;; Copyright © 2020, 2021 Nicolò Balzarotti <[email protected]>
42;;; Copyright © 2020 Tanguy Le Carrour <[email protected]>
43;;; Copyright © 2020 Lars-Dominik Braun <[email protected]>
44;;; Copyright © 2020 Guy Fleury Iteriteka <[email protected]>
45;;; Copyright © 2020 Michael Rohleder <[email protected]>
46;;; Copyright © 2020, 2025 Vinicius Monego <[email protected]>
47;;; Copyright © 2020 Vincent Legoll <[email protected]>
48;;; Copyright © 2021, 2024 Sharlatan Hellseher <[email protected]>
49;;; Copyright © 2021, 2024 Greg Hogan <[email protected]>
50;;; Copyright © 2021 David Larsson <[email protected]>
51;;; Copyright © 2021 Pjotr Prins <[email protected]>
52;;; Copyright © 2021 Bonface Munyoki Kilyungi <[email protected]>
53;;; Copyright © 2021 Simon Streit <[email protected]>
54;;; Copyright © 2021 Alexandre Hannud Abdo <[email protected]>
55;;; Copyright © 2021 Simon Tournier <[email protected]>
56;;; Copyright © 2021 Foo Chuan Wei <[email protected]>
57;;; Copyright © 2022, 2025 Zhu Zihao <[email protected]>
58;;; Copyright © 2021 Brice Waegeneire <[email protected]>
59;;; Copyright © 2022 muradm <[email protected]>
60;;; Copyright © 2022 Thomas Albers Raviola <[email protected]>
61;;; Copyright © 2021, 2022 jgart <[email protected]>
62;;; Copyright © 2023, 2024 Felix Gruber <[email protected]>
63;;; Copyright © 2023 Munyoki Kilyungi <[email protected]>
64;;; Copyright © 2023, 2025 Giacomo Leidi <[email protected]>
65;;; Copyright © 2024 Troy Figiel <[email protected]>
66;;; Copyright © 2024 gemmaro <[email protected]>
67;;; Copyright © 2025 Ashvith Shetty <[email protected]>
68;;; Copyright © 2025 Philippe Swartvagher <[email protected]>
69;;; Copyright © 2025 Simen Endsjø <[email protected]>
70;;; Copyright © 2025-2026 bdunahu <[email protected]>
71;;; Copyright © 2026 Spencer King <[email protected]>
72;;; Copyright © 2026 Peter Polidoro <[email protected]>
73;;; Copyright © 2026 Josep Bigorra <[email protected]>
74;;; Copyright © 2026 Daniel Littlewood <[email protected]>
75;;; Copyright © 2026 Zheng Junjie <[email protected]>
76;;;
77;;; This file is part of GNU Guix.
78;;;
79;;; GNU Guix is free software; you can redistribute it and/or modify it
80;;; under the terms of the GNU General Public License as published by
81;;; the Free Software Foundation; either version 3 of the License, or (at
82;;; your option) any later version.
83;;;
84;;; GNU Guix is distributed in the hope that it will be useful, but
85;;; WITHOUT ANY WARRANTY; without even the implied warranty of
86;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
87;;; GNU General Public License for more details.
88;;;
89;;; You should have received a copy of the GNU General Public License
90;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
91
92(define-module (gnu packages databases)
93 #:use-module (gnu packages)
94 #:use-module (gnu packages admin)
95 #:use-module (gnu packages algebra)
96 #:use-module (gnu packages autotools)
97 #:use-module (gnu packages base)
98 #:use-module (gnu packages bash)
99 #:use-module (gnu packages bison)
100 #:use-module (gnu packages boost)
101 #:use-module (gnu packages build-tools)
102 #:use-module (gnu packages dns)
103 #:use-module (gnu packages nss)
104 #:use-module (gnu packages check)
105 #:use-module (gnu packages cmake)
106 #:use-module (gnu packages compression)
107 #:use-module (gnu packages cpp)
108 #:use-module (gnu packages crypto)
109 #:use-module (gnu packages curl)
110 #:use-module (gnu packages cyrus-sasl)
111 #:use-module (gnu packages dbm)
112 #:use-module (gnu packages docbook)
113 #:use-module (gnu packages emacs)
114 #:use-module (gnu packages compiler-tools)
115 #:use-module (gnu packages freedesktop)
116 #:use-module (gnu packages gawk)
117 #:use-module (gnu packages gcc)
118 #:use-module (gnu packages gd)
119 #:use-module (gnu packages gettext)
120 #:use-module (gnu packages glib)
121 #:use-module (gnu packages gnome)
122 #:use-module (gnu packages gnupg)
123 #:use-module (gnu packages golang)
124 #:use-module (gnu packages golang-build)
125 #:use-module (gnu packages golang-check)
126 #:use-module (gnu packages golang-compression)
127 #:use-module (gnu packages golang-crypto)
128 #:use-module (gnu packages golang-web)
129 #:use-module (gnu packages golang-xyz)
130 #:use-module (gnu packages gperf)
131 #:use-module (gnu packages gtk)
132 #:use-module (gnu packages guile)
133 #:use-module (gnu packages guile-xyz)
134 #:use-module (gnu packages icu4c)
135 #:use-module (gnu packages jemalloc)
136 #:use-module (gnu packages kerberos)
137 #:use-module (gnu packages language)
138 #:use-module (gnu packages libedit)
139 #:use-module (gnu packages libevent)
140 #:use-module (gnu packages libffi)
141 #:use-module (gnu packages linux)
142 #:use-module (gnu packages lisp)
143 #:use-module (gnu packages lisp-xyz)
144 #:use-module (gnu packages llvm)
145 #:use-module (gnu packages logging)
146 #:use-module (gnu packages man)
147 #:use-module (gnu packages maths)
148 #:use-module (gnu packages multiprecision)
149 #:use-module (gnu packages ncurses)
150 #:use-module (gnu packages networking)
151 #:use-module (gnu packages node)
152 #:use-module (gnu packages onc-rpc)
153 #:use-module (gnu packages openldap)
154 #:use-module (gnu packages openstack)
155 #:use-module (gnu packages pantheon)
156 #:use-module (gnu packages parallel)
157 #:use-module (gnu packages pcre)
158 #:use-module (gnu packages perl)
159 #:use-module (gnu packages perl-check)
160 #:use-module (gnu packages perl-web)
161 #:use-module (gnu packages pkg-config)
162 #:use-module (gnu packages popt)
163 #:use-module (gnu packages pretty-print)
164 #:use-module (gnu packages prometheus)
165 #:use-module (gnu packages protobuf)
166 #:use-module (gnu packages python)
167 #:use-module (gnu packages python-build)
168 #:use-module (gnu packages python-check)
169 #:use-module (gnu packages python-compression)
170 #:use-module (gnu packages python-crypto)
171 #:use-module (gnu packages python-science)
172 #:use-module (gnu packages python-web)
173 #:use-module (gnu packages python-xyz)
174 #:use-module (gnu packages qt)
175 #:use-module (gnu packages rdf)
176 #:use-module (gnu packages readline)
177 #:use-module (gnu packages regex)
178 #:use-module (gnu packages rpc)
179 #:use-module (gnu packages ruby)
180 #:use-module (gnu packages ruby-check)
181 #:use-module (gnu packages ruby-xyz)
182 #:use-module (gnu packages security-token)
183 #:use-module (gnu packages serialization)
184 #:use-module (gnu packages sphinx)
185 #:use-module (gnu packages ssh)
186 #:use-module (gnu packages sqlite)
187 #:use-module (gnu packages tcl)
188 #:use-module (gnu packages terminals)
189 #:use-module (gnu packages texinfo)
190 #:use-module (gnu packages textutils)
191 #:use-module (gnu packages time)
192 #:use-module (gnu packages tls)
193 #:use-module (gnu packages valgrind)
194 #:use-module (gnu packages web)
195 #:use-module (gnu packages xdisorg)
196 #:use-module (gnu packages xml)
197 #:use-module (guix deprecation)
198 #:use-module (guix gexp)
199 #:use-module ((guix licenses) #:prefix license:)
200 #:use-module (guix packages)
201 #:use-module (guix download)
202 #:use-module (guix bzr-download)
203 #:use-module (guix git-download)
204 #:use-module (guix hg-download)
205 #:use-module (guix build-system copy)
206 #:use-module (guix build-system emacs)
207 #:use-module (guix build-system gnu)
208 #:use-module (guix build-system go)
209 #:use-module (guix build-system guile)
210 #:use-module (guix build-system meson)
211 #:use-module (guix build-system perl)
212 #:use-module (guix build-system pyproject)
213 #:use-module (guix build-system qt)
214 #:use-module (guix build-system ruby)
215 #:use-module (guix build-system cmake)
216 #:use-module (guix utils)
217 #:use-module (srfi srfi-1)
218 #:use-module (srfi srfi-26)
219 #:use-module (ice-9 match))
220
221(define-public ephemeralpg
222 (package
223 (name "ephemeralpg")
224 (version "3.1")
225 (source
226 (origin
227 (method url-fetch)
228 (uri (string-append
229 "https://eradman.com/ephemeralpg/code/ephemeralpg-"
230 version ".tar.gz"))
231 (sha256
232 (base32 "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6"))))
233 (build-system gnu-build-system)
234 (arguments
235 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
236 (string-append "PREFIX=" %output))
237 #:phases
238 (modify-phases %standard-phases
239 (delete 'configure) ; no configure script
240 (add-after 'install 'wrap
241 (lambda* (#:key inputs outputs #:allow-other-keys)
242 (let ((out (assoc-ref outputs "out")))
243 (wrap-program (string-append out "/bin/pg_tmp")
244 `("PATH" ":" prefix
245 (,(string-append (assoc-ref inputs "util-linux")
246 "/bin")
247 ,(string-append (assoc-ref inputs "postgresql")
248 "/bin")
249 ;; For getsocket.
250 ,(string-append out "/bin"))))))))
251 #:test-target "test"))
252 (inputs
253 (list bash-minimal postgresql util-linux))
254 (native-inputs
255 ;; For tests.
256 (list ruby which))
257 (home-page "https://eradman.com/ephemeralpg/")
258 (synopsis "Run temporary PostgreSQL databases")
259 (description
260 "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
261like running software test suites. Temporary databases created with
262@code{pg_tmp} have a limited shared memory footprint and are automatically
263garbage-collected after a configurable number of seconds (the default is
26460).")
265 (license license:isc)))
266
267(define-public es-dump-restore
268 (package
269 (name "es-dump-restore")
270 (version "2.1.0")
271 (source
272 (origin
273 (method url-fetch)
274 (uri (rubygems-uri "es_dump_restore" version))
275 (sha256
276 (base32
277 "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
278 (build-system ruby-build-system)
279 (arguments
280 '(#:tests? #f)) ;; No testsuite.
281 (propagated-inputs
282 (list ruby-httpclient ruby-multi-json ruby-progress_bar ruby-rubyzip
283 ruby-thor))
284 (synopsis "Utility for dumping and restoring ElasticSearch indexes")
285 (description
286 "This package provides a utility for dumping the contents of an
287ElasticSearch index to a compressed file and restoring the dumpfile back to an
288ElasticSearch server")
289 (home-page "https://github.com/patientslikeme/es_dump_restore")
290 (license license:expat)))
291
292(define-public firebird
293 (package
294 (name "firebird")
295 (version "3.0.13")
296 (source
297 (origin
298 (method git-fetch)
299 (uri (git-reference
300 (url "https://github.com/FirebirdSQL/firebird")
301 (commit (string-append "v" version))))
302 (file-name (git-file-name name version))
303 (sha256
304 (base32 "0h697y53vk7yvlifr35vjl3vkv8m5ny7j05r70qnqcvjy0axqbdn"))
305 (patches (search-patches "firebird-riscv64-support-pt1.patch"
306 "firebird-riscv64-support-pt2.patch"))
307 (modules '((guix build utils)))
308 (snippet
309 `(begin
310 (for-each
311 delete-file-recursively
312 (list "extern/btyacc/test" ; TODO: package and remove entirely
313 "extern/editline"
314 "extern/icu"
315 "extern/libtommath"
316 "extern/zlib"
317 "src/include/firebird/impl/boost"
318
319 ;; Missing licence.
320 "builds/install/arch-specific/solaris"
321 "extern/SfIO"
322 "src/msgs/templates.sql"
323
324 ;; Generated files missing sources.
325 "doc/README.SecureRemotePassword.html"))))))
326 (build-system gnu-build-system)
327 (outputs (list "debug" "out"))
328 (arguments
329 `(#:configure-flags
330 (let ((out (assoc-ref %outputs "out")))
331 (list (string-append "--with-fbsbin=" out "/sbin")
332 (string-append "--with-fbdoc=" out "/share/doc/"
333 ,name "-" ,version)
334 (string-append "--with-fbconf=" out "/lib/firebird")
335 (string-append "--with-fbintl=" out "/lib/firebird/intl")
336 (string-append "--with-fbmisc=" out "/lib/firebird/misc")
337 (string-append "--with-fbmsg=" out "/lib/firebird")
338 (string-append "--with-fbplugins=" out "/lib/firebird/plugins")
339 (string-append "--with-fbudf=" out "/lib/firebird/UDF")
340 "--with-fbglock=/run/firebird"
341 "--with-fblog=/var/log/firebird"
342 "--with-fbhelp=/var/lib/firebird/system"
343 "--with-fbsecure-db=/var/lib/firebird/secure"
344 "--without-fbsample"
345 "--without-fbsample-db"
346 "--with-system-editline"))
347 #:make-flags
348 (list (string-append "CC=" ,(cc-for-target))
349 ;; The plugins/ can't find libfbclient otherwise.
350 (string-append "LDFLAGS=-Wl,-rpath="
351 (assoc-ref %outputs "out") "/lib"))
352 #:tests? #f ; no test suite
353 #:modules ((guix build gnu-build-system)
354 (guix build utils)
355 (srfi srfi-26))
356 #:phases
357 (modify-phases %standard-phases
358 ,@(if (target-riscv64?)
359 `((add-before 'bootstrap 'force-bootstrap
360 (lambda _
361 (delete-file "configure")
362 ;; This file prevents automake from running.
363 (delete-file "autogen.sh"))))
364 '())
365 (add-after 'unpack 'use-system-boost
366 (lambda _
367 (substitute* "src/include/firebird/Message.h"
368 (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"")
369 "<boost/preprocessor/seq/for_each_i.hpp>")
370 (("FB_BOOST_") "BOOST_"))))
371 (add-after 'unpack 'patch-installation
372 (lambda _
373 (substitute*
374 "builds/install/arch-specific/linux/makeInstallImage.sh.in"
375 (("/bin/sh") (which "bash"))
376 ;; Remove shell script helpers from $PATH.
377 (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":")
378 ;; Put files where Guix users expect them.
379 (("(License\\.txt.*)@FB_CONFDIR" match)
380 (string-append match "@FB_DOCDIR@"))
381 (("@FB_CONFDIR@(.*License\\.txt.*)" match)
382 (string-append "@FB_DOCDIR@" match))
383 (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail)
384 (string-append head "@FB_DOCDIR@" tail "\n")))
385 (substitute*
386 (list "builds/install/posix-common/changeServerMode.sh.in"
387 "builds/install/posix-common/install.sh.in")
388 ;; Skip phases that (could) cause problems in Guix.
389 (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser")
390 ":")
391 ;; Skip phases that are merely pointless on Guix.
392 (("buildUninstallFile|installInitdScript|startFirebird") ":")
393 ;; Omit randomly generated password with bonus timestamp.
394 (("setDBAPassword") ":"))
395
396 ;; These promote proprietary workflows not relevant on Guix.
397 (for-each delete-file-recursively
398 (find-files "doc" "README\\.(build\\.msvc|NT|Win)"))))
399 (add-after 'configure 'delete-init-scripts
400 (lambda _
401 (delete-file-recursively "gen/install/misc")))
402 (add-before 'build 'set-build-environment-variables
403 (lambda _
404 ;; ‘isql’ needs to run & find libfbclient.so during the build.
405 ;; This doubles as a rudimentary test in lieu of a test suite.
406 (setenv "LD_LIBRARY_PATH"
407 (string-append (assoc-ref %build-inputs "icu4c") "/lib"))))
408 (add-before 'install 'keep-embedded-debug-symbols
409 (lambda _
410 ;; Let the gnu-build-system separate & deal with them later.
411 ;; XXX Upstream would use ‘--strip-unneeded’, shaving a whole
412 ;; megabyte off Guix's 7.7M libEngine12.so, for example.
413 (substitute* "gen/Makefile.install"
414 (("readelf") "false"))))
415 (add-after 'install 'prune-undesirable-files
416 (lambda* (#:key outputs #:allow-other-keys)
417 (let ((out (assoc-ref outputs "out")))
418 (with-directory-excursion out
419 ;; Remove example binaries.
420 (for-each delete-file-recursively
421 (find-files "." "example"))
422 ;; Delete (now-)empty directories.
423 (for-each rmdir
424 (list "include/firebird/impl"
425 "lib/firebird/plugins/udr")))))))))
426 (native-inputs
427 (list autoconf automake libtool))
428 (inputs
429 (list boost
430 editline
431 icu4c-77
432 libtommath
433 ncurses
434 zlib))
435 (home-page "https://www.firebirdsql.org")
436 (synopsis "Relational database with many ANSI SQL standard features")
437 (description
438 "Firebird is an SQL @acronym{RDBMS, relational database management system}
439with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}) including
440@acronym{UDFs, user-defined functions} and PSQL stored procedures, cursors, and
441triggers. Transactions provide full ACID-compliant referential integrity.
442
443The database requires very little manual maintenance once set up, making it
444ideal for small business or embedded use.
445
446When installed as a traditional local or remote (network) database server,
447Firebird can grow to terabyte scale with proper tuning---although PostgreSQL
448may be a better choice for such very large environments.
449
450Firebird can also be embedded into stand-alone applications that don't want or
451need a full client & server. Used in this manner, it offers richer SQL support
452than SQLite as well as the option to seamlessly migrate to a client/server
453database later.")
454 (license
455 ;; See doc/license/README.license.usage.txt for rationale & details.
456 (list license:bsd-3 ; src/common/sha2/
457 license:bsd-4 ; src/common/enc.cpp
458 license:gpl2+ ; builds/posix/make.defaults
459 (license:non-copyleft "file:///builds/install/misc/IPLicense.txt"
460 "InterBase Public License v1.0")
461 (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt"
462 "Initial Developer's Public License v1.0")
463 license:lgpl2.1 ; exception for OSI-compatible licences
464 license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp
465 license:public-domain)))) ; including files without explicit licence
466
467(define-public go-github-com-cockroachdb-pebble
468 ;; TODO: As inherited package can't be placed in separate module, keeping
469 ;; this Golang source library here.
470 (package
471 (name "go-github-com-cockroachdb-pebble")
472 (version "1.1.5")
473 (source
474 (origin
475 (method git-fetch)
476 (uri (git-reference
477 (url "https://github.com/cockroachdb/pebble")
478 (commit (string-append "v" version))))
479 (file-name (git-file-name name version))
480 (sha256
481 (base32 "15px3m8fid7fwh0xfyia75aak6a5sx5q3r01n79fr6mnyiaix18a"))))
482 (build-system go-build-system)
483 (arguments
484 (list
485 #:build-flags #~(list "-tags" "external_libzstd")
486 #:test-flags #~(list "-tags" "external_libzstd"
487 ;; Skip tests requiring git in PATH.
488 "-skip" "TestLint"
489 "-vet=off")
490 ;; XXX: Maybe run more tests if possible.
491 #:test-subdirs #~(list "internal/...")
492 #:import-path "github.com/cockroachdb/pebble"))
493 (native-inputs
494 (list go-github-com-stretchr-testify
495 go-golang-org-x-perf
496 pkg-config))
497 (inputs
498 (list (list zstd "lib")))
499 (propagated-inputs
500 (list go-github-com-cespare-xxhash-v2
501 go-github-com-cockroachdb-datadriven
502 go-github-com-cockroachdb-errors
503 go-github-com-cockroachdb-fifo
504 go-github-com-cockroachdb-redact
505 go-github-com-cockroachdb-tokenbucket
506 go-github-com-datadog-zstd
507 go-github-com-ghemawat-stream
508 go-github-com-golang-snappy
509 go-github-com-guptarohit-asciigraph
510 go-github-com-hdrhistogram-hdrhistogram-go
511 go-github-com-klauspost-compress
512 go-github-com-kr-pretty
513 go-github-com-pkg-errors
514 go-github-com-pmezard-go-difflib
515 go-github-com-prometheus-client-golang
516 go-github-com-prometheus-client-model
517 go-github-com-spf13-cobra
518 go-golang-org-x-exp
519 go-golang-org-x-perf
520 go-golang-org-x-sync
521 go-golang-org-x-sys))
522 (home-page "https://github.com/cockroachdb/pebble")
523 (synopsis "RocksDB/LevelDB inspired key-value database in Golang")
524 (description
525 "Pebble is a LevelDB/RocksDB inspired key-value store focused on
526performance and internal usage by CockroachDB. Pebble inherits the RocksDB
527file formats and a few extensions such as range deletion tombstones,
528table-level bloom filters, and updates to the MANIFEST format.")
529 (license license:bsd-3)))
530
531(define-public go-github-com-cockroachdb-pebble-v2
532 (package
533 (inherit go-github-com-cockroachdb-pebble)
534 (name "go-github-com-cockroachdb-pebble-v2")
535 (version "2.1.4")
536 (source
537 (origin
538 (method git-fetch)
539 (uri (git-reference
540 (url "https://github.com/cockroachdb/pebble")
541 (commit (string-append "v" version))))
542 (file-name (git-file-name name version))
543 (sha256
544 (base32 "1ca58sy1q3c8czqb69nkygk0hvz8b92xkb2fpj87hnncg0zh9a9p"))))
545 (arguments
546 (substitute-keyword-arguments
547 (package-arguments go-github-com-cockroachdb-pebble)
548 ((#:tests? _ #t) #f) ; TODO: Find out why some tests fails to build
549 ((#:import-path _) "github.com/cockroachdb/pebble/v2")))
550 (propagated-inputs
551 (modify-inputs propagated-inputs
552 (append go-github-com-cockroachdb-crlib
553 go-github-com-cockroachdb-swiss
554 go-github-com-minio-minlz
555 go-github-com-raduberinde-axisds)))))
556
557;; XXX: This repository has been archived by the owner on Sep 21, 2022. It is
558;; now read-only. It's only used by go-github-com-golang-gddo, consider to
559;; remove it when it does no longer require it.
560(define-public go-github-com-garyburd-redigo
561 (package
562 (name "go-github-com-garyburd-redigo")
563 (version "1.6.4")
564 (source
565 (origin
566 (method git-fetch)
567 (uri (git-reference
568 (url "https://github.com/DeprecatedGoModules/redigo")
569 (commit (string-append "v" version))))
570 (file-name (git-file-name name version))
571 (sha256
572 (base32 "0xq1r7149z358g1dra2dwgmdlk8ynk89bkdgf9y4xx9vyddlaw08"))))
573 (build-system go-build-system)
574 (arguments
575 (list
576 #:skip-build? #t
577 #:import-path "github.com/garyburd/redigo"
578 #:test-flags
579 #~(list "-skip" (string-join
580 ;; pubsub_test.go:28: Punsubscribe(p1) =
581 ;; {punsubscribe p2 3}, want {punsubscribe p1 3}
582 ;; pubsub_test.go:28: Punsubscribe() =
583 ;; {punsubscribe p1 2}, want {punsubscribe p2 2}
584 (list "TestPushed"
585 ;; error connection to database, dial tcp
586 ;; :6379: connect: connection refused
587 "TestConnMux"
588 "TestConnMuxClose")
589 "|"))))
590 (native-inputs (list redis))
591 (home-page "https://github.com/garyburd/redigo")
592 (synopsis "Deprecated Redis client for Golang")
593 (description
594 "This package provides a Redis client for Golang. It is deprecated,
595consider using go-github-com-gomodule-redigo instead.")
596 (license license:asl2.0)))
597
598(define-public pebble
599 (package/inherit go-github-com-cockroachdb-pebble
600 (name "pebble")
601 (arguments
602 (substitute-keyword-arguments
603 (package-arguments go-github-com-cockroachdb-pebble)
604 ((#:tests? _ #t) #f)
605 ((#:install-source? _ #t) #f)
606 ((#:import-path _) "github.com/cockroachdb/pebble/cmd/pebble")
607 ((#:unpack-path _ "") "github.com/cockroachdb/pebble")))
608 (native-inputs
609 (append (package-propagated-inputs go-github-com-cockroachdb-pebble)
610 (package-native-inputs go-github-com-cockroachdb-pebble)))
611 (propagated-inputs '())
612 (description
613 (string-append (package-description
614 go-github-com-cockroachdb-pebble)
615 "\nThis package provides command line interface (CLI)."))))
616
617(define-public dicedb
618 (package
619 (name "dicedb")
620 (version "1.0.10")
621 (source
622 (origin
623 (method git-fetch)
624 (uri (git-reference
625 (url "https://github.com/DiceDB/dice")
626 (commit (string-append "v" version))))
627 (file-name (git-file-name name version))
628 (sha256
629 (base32 "1f9qsqmv41ikkrb5pfrh3b7cv3x82yzq7m3p2d3iml9azbmxvkyy"))
630 (patches (search-patches "dicedb-remove-init-from-config-subpkg.patch"))))
631 (build-system go-build-system)
632 (arguments
633 (list
634 #:install-source? #f
635 #:import-path "github.com/dicedb/dice"
636 #:build-flags
637 #~(list (format #f "-ldflags=-X github.com/dicedb/dice/config.DiceDBVersion=v~a"
638 #$version))
639 #:test-subdirs
640 #~(list ;; "internal/auth/..." ; build failed
641 "internal/cmd/..."
642 "internal/comm/..."
643 "internal/common/..."
644 "internal/dencoding/..."
645 "internal/errors/..."
646 ;; "internal/eval/..." ; build failed
647 "internal/id/..."
648 "internal/iomultiplexer/..."
649 "internal/logger/..."
650 "internal/object/..."
651 "internal/observability/..."
652 "internal/ops/..."
653 "internal/regex/..."
654 "internal/server/..."
655 "internal/shard/..."
656 "internal/shardmanager/..."
657 "internal/shardthread/..."
658 "internal/store/..."
659 "internal/types/..."
660 "internal/wal/..."
661 "internal/watchmanager/...")
662 #:phases
663 #~(modify-phases %standard-phases
664 (add-after 'unpack 'remove-example
665 (lambda* (#:key tests? import-path #:allow-other-keys)
666 (with-directory-excursion (string-append "src/" import-path)
667 (delete-file-recursively "examples")))))))
668 (native-inputs
669 (list go-github-com-axiomhq-hyperloglog
670 go-github-com-bytedance-sonic
671 go-github-com-cespare-xxhash-v2
672 go-github-com-dgryski-go-farm
673 go-github-com-dicedb-dicedb-go
674 go-github-com-gobwas-glob
675 go-github-com-google-btree
676 go-github-com-google-go-cmp
677 go-github-com-google-uuid
678 go-github-com-mmcloughlin-geohash
679 go-github-com-ohler55-ojg
680 go-github-com-rs-xid
681 go-github-com-rs-zerolog
682 go-github-com-spf13-cobra
683 go-github-com-spf13-pflag
684 go-github-com-spf13-viper
685 go-github-com-stretchr-testify
686 go-github-com-twmb-murmur3
687 go-github-com-wangjia184-sortedset
688 go-golang-org-x-crypto
689 go-google-golang-org-protobuf
690 go-gotest-tools-v3))
691 (home-page "https://github.com/dicedb/dice")
692 (synopsis "Fast, reactive, in-memory database optimized for modern hardware")
693 (description
694 "@code{dicedb} is a fast, reactive, in-memory database optimized for
695modern hardware. Commonly used as a cache, it offers a familiar interface
696while enabling real-time data updates through query subscriptions. It
697delivers higher throughput and lower median latencies, making it ideal for
698modern workloads.")
699 (license license:bsd-3)))
700
701(define-public dicedb-cli
702 (package
703 (name "dicedb-cli")
704 (version "1.0.8")
705 (source
706 (origin
707 (method git-fetch)
708 (uri (git-reference
709 (url "https://github.com/dicedb/dicedb-cli")
710 (commit (string-append "v" version))))
711 (file-name (git-file-name name version))
712 (sha256
713 (base32 "0hglagah0wpdkzw5fs5b1jx6m972yriwjl4zwg7sjs529v4jf3sw"))))
714 (build-system go-build-system)
715 (arguments
716 (list
717 #:install-source? #f
718 #:import-path "github.com/dicedb/dicedb-cli"
719 #:test-flags
720 ;; XXX: This might be an issue with cobra: parse_args_test.go:90:
721 ;; parseArgs("SET key \"unterminated value") = []string{}; expected
722 ;; []string{"SET", "key", "unterminated value"}
723 #~(list "-skip" "TestParseArgs_EdgeCases/Unterminated_quote.*")))
724 (native-inputs
725 (list go-github-com-chzyer-readline
726 go-github-com-dicedb-dicedb-go
727 go-github-com-fatih-color
728 go-github-com-google-shlex
729 go-github-com-spf13-cobra
730 go-google-golang-org-protobuf))
731 (home-page "https://github.com/DiceDB/dicedb-cli")
732 (synopsis "Command line interface for DiceDB")
733 (description
734 "@command{dicedb-cli} is a command line interface for
735@url{https://dicedb.io, DiceDB}, a Redis-compliant in-memory database.")
736 (license (list license:expat ;MIT in README
737 license:bsd-3)))) ;BSD-3 in LICENSE file
738
739(define-public leveldb
740 (package
741 (name "leveldb")
742 (version "1.23")
743 (source (origin
744 (method git-fetch)
745 (uri (git-reference
746 (url "https://github.com/google/leveldb")
747 (commit version)))
748 (file-name (git-file-name name version))
749 (sha256
750 (base32
751 "1chxkhb6ajdmj4p8535k4472fbmqvcismll6aapkarsr45yrvgs4"))))
752 (build-system cmake-build-system)
753 (arguments
754 (list #:configure-flags
755 #~(list "-DBUILD_SHARED_LIBS=ON"
756 "-DLEVELDB_BUILD_TESTS=ON"
757
758 ;; Don't install(!) the third_party test frameworks below.
759 "-DINSTALL_GTEST=OFF"
760 "-DBENCHMARK_ENABLE_INSTALL=OFF")
761 #:phases
762 #~(modify-phases %standard-phases
763 ;; Ceph uses leveldb and depends on RTTI.
764 (add-after 'unpack 'allow-RTTI
765 (lambda _
766 (substitute* "CMakeLists.txt"
767 (("set\\(CMAKE_CXX_FLAGS \"\\$\\{CMAKE_CXX_FLAGS\\} -fno-rtti\"\\)")
768 ""))))
769 (add-after 'unpack 'unpack-third_party-sources
770 ;; These are only for testing, so copying source is fine.
771 (lambda _
772 (copy-recursively #$(package-source googletest)
773 "third_party/googletest")
774 (copy-recursively #$(package-source googlebenchmark)
775 "third_party/benchmark"))))))
776 (inputs
777 (list snappy))
778 (home-page "https://github.com/google/leveldb")
779 (synopsis "Fast key-value storage library")
780 (description
781 "LevelDB is a fast key-value storage library that provides an ordered
782mapping from string keys to string values.")
783 (license license:bsd-3)))
784
785(define-public memcached
786 (package
787 (name "memcached")
788 (version "1.6.42")
789 (source
790 (origin
791 (method url-fetch)
792 (uri (string-append
793 "https://memcached.org/files/memcached-" version ".tar.gz"))
794 (sha256
795 (base32 "1rsx752qpp11zirrlznv72770p71mpmfj1frm7g3d7agkn3qpw2h"))))
796 (build-system gnu-build-system)
797 (inputs
798 (list libevent cyrus-sasl))
799 (home-page "https://memcached.org/")
800 (synopsis "In-memory caching service")
801 (description "Memcached is an in-memory key-value store. It has a small
802and generic API, and was originally intended for use with dynamic web
803applications.")
804 (license license:bsd-3)))
805
806(define-public python-adbc-driver-manager
807 (package
808 (name "python-adbc-driver-manager")
809 (version "1.1.0")
810 (source
811 (origin
812 (method url-fetch)
813 (uri (pypi-uri "adbc_driver_manager" version))
814 (sha256
815 (base32 "00i3zg6rbzdz767j9w22ajw8rxwbhkrmzwwlmx11q56cvnig0cm3"))))
816 (build-system pyproject-build-system)
817 (arguments
818 (list
819 ;; TODO: Pack arrow-adbc/c/driver/sqlite for tests.
820 #:tests? #f
821 #:build-backend "setuptools.build_meta"))
822 (native-inputs
823 (list python-cython
824 python-setuptools
825 python-wheel))
826 (propagated-inputs
827 (list python-typing-extensions))
828 (home-page "https://arrow.apache.org/adbc/")
829 (synopsis "Generic entrypoint for ADBC drivers in Python")
830 (description
831 "This package contains bindings for the ADBC Driver Manager, as well as a
832@url{https://peps.python.org/pep-0249/,DBAPI 2.0/PEP 249-compatible} interface
833on top. This can be used to load ADBC drivers at runtime and use them from
834Python. Backend-specific packages like @code{adbc_driver_postgresql} wrap
835this package in a more convenient interface, and should be preferred where
836they exist.")
837 (license license:asl2.0)))
838
839;; XXX: This project was archived by the owner on Apr 15, 2025. It is now
840;; read-only.
841(define-public python-prisma
842 (package
843 (name "python-prisma")
844 (version "0.15.0")
845 (source
846 (origin
847 (method url-fetch)
848 (uri (pypi-uri "prisma" version))
849 (sha256
850 (base32 "01x1ki99k2ps2jis73vzzrqw8zsf810205f17zdja9ijm0m41mjw"))))
851 (build-system pyproject-build-system)
852 (arguments
853 (list #:tests? #f)) ;no tests in PyPI
854 (native-inputs
855 (list python-setuptools))
856 (propagated-inputs
857 (list python-click
858 python-dotenv
859 python-httpx
860 python-jinja2
861 python-nodeenv
862 python-pydantic
863 python-tomlkit
864 python-typing-extensions))
865 (home-page "https://github.com/RobertCraigie/prisma-client-py")
866 (synopsis "Fully type-safe database client")
867 (description
868 "Prisma Client Python is an auto-generated and fully type-safe database
869client.")
870 (license license:asl2.0)))
871
872(define-public python-psycopg2cffi
873 (package
874 (name "python-psycopg2cffi")
875 (version "2.9.0")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri "psycopg2cffi" version))
880 (sha256
881 (base32 "0ljwsglgjm0c28dzlqlyvbz1jnn4hpmqa8dn28fkmpipv3f2w9vy"))))
882 (build-system pyproject-build-system)
883 ;; TODO: Fix tests: ImportError: cannot import name 'psycopg2_tests' from
884 ;; partially initialized module 'psycopg2cffi.tests' (most likely due to a
885 ;; circular import)
886 (arguments '(#:tests? #f))
887 (propagated-inputs (list python-cffi
888 python-six)) ;; hard dependency
889 (native-inputs (list python-setuptools postgresql))
890 (home-page "https://github.com/chtd/psycopg2cffi")
891 (synopsis "Port of psycopg2 to CFFI")
892 (description
893 "This package is an implementation of @code{psycopg2} using CFFI.")
894 (license license:lgpl3)))
895
896(define-public litecli
897 (package
898 (name "litecli")
899 (version "1.15.0")
900 (source
901 (origin
902 (method url-fetch)
903 (uri (pypi-uri "litecli" version))
904 (sha256
905 (base32 "0yfdafh21k8fls85rgyfn03xxn6x5hqcnmlq1v3jvmxjaxzrk19j"))))
906 (build-system pyproject-build-system)
907 (arguments
908 (list
909 ;; These tests depend on python-llm (not packaged)
910 #:test-flags #~(list "-k" (string-append
911 "not test_refresh_called_once"
912 " and not test_refresh_called_twice"
913 " and not test_refresh_with_callbacks"
914 " and not test_llm_command_known_subcommand"))
915 #:phases #~(modify-phases %standard-phases
916 (add-after 'unpack 'relax-sqlparse
917 (lambda _
918 (substitute* "pyproject.toml"
919 ;; Currently we have 0.4.3 and it is fine. Remove this
920 ;; line when sqlparse is updated.
921 (("sqlparse>=0.4.4") "sqlparse")
922 ;; Also remove python-pip from sanity-check.
923 (("\"pip\",") "")))))))
924 (propagated-inputs
925 (list python-cli-helpers
926 python-click
927 python-configobj
928 python-prompt-toolkit
929 python-pygments
930 python-sqlparse))
931 (native-inputs
932 (list python-pytest python-setuptools python-wheel))
933 (home-page "https://litecli.com")
934 (synopsis "CLI for SQLite databases")
935 (description
936 "@code{litecli} is a command-line client for SQLite databases that has
937auto-completion and syntax highlighting.")
938 (license license:bsd-3)))
939
940(define-public python-pgspecial
941 (package
942 (name "python-pgspecial")
943 (version "2.2.1")
944 (source
945 (origin
946 (method url-fetch)
947 (uri (pypi-uri "pgspecial" version))
948 (sha256
949 (base32 "17c4qjvi83b3im9fb00cdzzb24v5xis6y1625l9v0yzggg67yv6s"))))
950 (build-system pyproject-build-system)
951 (native-inputs (list python-pytest
952 python-setuptools
953 python-setuptools-scm
954 python-wheel))
955 (propagated-inputs (list python-click
956 python-configobj
957 python-psycopg
958 python-sqlparse
959 python-typing-extensions))
960 (home-page "https://github.com/dbcli/pgspecial")
961 (synopsis
962 "Python implementation of PostgreSQL meta commands (backslash commands)")
963 (description
964 "This Python package provides an API to execute meta-commands (AKA
965\"special\", or \"backslash commands\") on PostgreSQL.")
966 (license license:bsd-3)))
967
968(define-public python-sqlite-anyio
969 (package
970 (name "python-sqlite-anyio")
971 (version "0.2.8")
972 (source
973 (origin
974 (method git-fetch)
975 (uri (git-reference
976 (url "https://github.com/davidbrochart/sqlite-anyio")
977 (commit version)))
978 (file-name (git-file-name name version))
979 (sha256
980 (base32 "075fnrrwzn9xc2clkcsyfycjc870khcwnpdg4g726qwl44pfzy2a"))))
981 (build-system pyproject-build-system)
982 (propagated-inputs (list python-anyio python-typing-extensions))
983 (native-inputs (list python-pytest python-uv-build))
984 (home-page "https://github.com/davidbrochart/sqlite-anyio")
985 (synopsis "Asynchronous client for SQLite using AnyIO")
986 (description "This package provides an asynchronous client for SQLite
987using @code{AnyIO}.")
988 (license license:expat)))
989
990(define-public python-sqlitedict
991 (package
992 (name "python-sqlitedict")
993 (version "2.1.0")
994 (source (origin
995 (method url-fetch)
996 (uri (pypi-uri "sqlitedict" version))
997 (sha256
998 (base32
999 "134y1ya74ah3g1pd3g9iqjlrcjr2y5b2iny2skqrcab0dnwwzn83"))))
1000 (build-system pyproject-build-system)
1001 (arguments
1002 (list
1003 #:test-flags
1004 ;; assert os.system('env PYTHONPATH=. %s tests/autocommit.py' %
1005 ;; sys.executable) == 0
1006 #~(list "--deselect=tests/test_autocommit.py::test")))
1007 (native-inputs (list python-pytest python-setuptools))
1008 (home-page "https://github.com/piskvorky/sqlitedict")
1009 (synopsis "Persistent dict backed up by sqlite3 and pickle")
1010 (description
1011 "This package provides a lightweight wrapper around the sqlite3 database
1012with a simple, Pythonic @code{dict}-like interface and support for
1013multi-thread access.")
1014 (license license:asl2.0)))
1015
1016(define-public pgcli
1017 (package
1018 (name "pgcli")
1019 (version "4.3.0")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (pypi-uri "pgcli" version))
1024 (sha256
1025 (base32 "1vva1fi5sqrdvmx7jmdjmy8zwly22sbsj5lzy60s822m1iay2nkn"))))
1026 (build-system pyproject-build-system)
1027 (arguments
1028 ;; AttributeError: 'NoneType' object has no attribute 'kwargs'.
1029 (list #:test-flags #~(list "-k" "not test_application_name_in_env")))
1030 (propagated-inputs
1031 (list python-cli-helpers
1032 python-click
1033 python-configobj
1034 python-pgspecial
1035 python-prompt-toolkit
1036 python-psycopg
1037 python-pygments
1038 python-setproctitle
1039 python-sqlparse
1040 python-tzlocal))
1041 (native-inputs
1042 (list python-pytest python-setuptools python-sshtunnel python-wheel))
1043 (home-page "https://www.pgcli.com")
1044 (synopsis "PostgreSQL CLI with autocompletion and syntax highlighting")
1045 (description
1046 "@code{pgcli} is a command line interface for PostgreSQL with
1047autocompletion and syntax highlighting.")
1048 (license license:bsd-3)))
1049
1050(define-public mycli
1051 (package
1052 (name "mycli")
1053 (version "1.37.1")
1054 (source
1055 (origin
1056 (method url-fetch)
1057 (uri (pypi-uri "mycli" version))
1058 (sha256
1059 (base32 "03kvw0n6s3f06whr7prjfwp1arl66mahlxizv27i9dkm5ibv1qrz"))))
1060 (build-system pyproject-build-system)
1061 (arguments
1062 '(#:tests? #f)) ; tests expect a running MySQL
1063 (native-inputs
1064 (list python-setuptools
1065 python-setuptools-scm))
1066 (propagated-inputs
1067 (list python-cli-helpers
1068 python-click-7
1069 python-configobj
1070 python-cryptography
1071 python-prompt-toolkit
1072 python-pyaes
1073 python-pyfzf
1074 python-pygments
1075 python-pymysql
1076 python-pyperclip
1077 python-sqlglot
1078 python-sqlglotrs
1079 python-sqlparse))
1080 (home-page "https://www.mycli.net")
1081 (synopsis
1082 "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting")
1083 (description
1084 "MyCLI is a command line interface for MySQL, MariaDB, and Percona with
1085auto-completion and syntax highlighting.")
1086 (license license:bsd-3)))
1087
1088(define-public mysql
1089 (package
1090 (name "mysql")
1091 (version "9.7.0")
1092 (source (origin
1093 (method url-fetch)
1094 (uri (list (string-append
1095 "https://cdn.mysql.com/Downloads/MySQL-"
1096 (version-major+minor version) "/"
1097 name "-" version ".tar.gz")))
1098 (sha256
1099 (base32
1100 "0v9hc8yzp0f5pwl4kr1a8k7lwyf62g95klxb6avfrc2npjx79dbl"))
1101 (modules '((guix build utils)))
1102 (snippet
1103 #~(begin
1104 ;; Delete bundled source libraries.
1105 (delete-all-but "extra"
1106 ;; XXX: The build system doesn't currently
1107 ;; support unbundling these.
1108 "json" ;used by bundled opentelemetry
1109 "libbacktrace"
1110 "libcno"
1111 "opentelemetry-cpp"
1112 "opentelemetry-proto"
1113 "rapidjson"
1114 "unordered_dense"
1115 "xxhash")))))
1116 (build-system cmake-build-system)
1117 (arguments
1118 (list
1119 #:tests? #f ;FIXME: teach build system to use system googletest
1120 #:configure-flags
1121 #~(list "-DBUILD_CONFIG=mysql_release"
1122 "-DWITH_AUTHENTICATION_LDAP=ON"
1123 "-DWITH_AUTHENTICATION_WEBAUTHN=ON"
1124 "-DWITH_BENCHMARK=OFF"
1125 ;; XXX: BUILD_ID is disabled so that the INFO_BIN target is not
1126 ;; run; this target relies on running mysqld before it is
1127 ;; installed, which fails in our case.
1128 "-DWITH_BUILD_ID=OFF"
1129 "-DWITH_FIDO=system"
1130 "-DWITH_SYSTEM_LIBS=ON"
1131 "-DWITH_UNIT_TESTS=OFF" ;avoid bundled googletest
1132 "-DREPRODUCIBLE_BUILD=ON"
1133 "-DMYSQL_DATADIR=/var/lib/mysql"
1134 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
1135 "-DINSTALL_INFODIR=share/info"
1136 "-DINSTALL_MANDIR=share/man"
1137 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
1138 "-DINSTALL_INCLUDEDIR=include/mysql"
1139 "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
1140 "-DINSTALL_SUPPORTFILESDIR=share/mysql"
1141 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
1142 "-DINSTALL_MYSQLTESTDIR=OFF"
1143 "-DINSTALL_DOCDIR=share/mysql/docs"
1144 "-DINSTALL_SHAREDIR=share/mysql")
1145 #:phases
1146 #~(modify-phases %standard-phases
1147 (add-before 'configure 'disable-broken-abi-check
1148 (lambda _
1149 ;; The ABI check started failing with MySQL 9.7.0 for unknown
1150 ;; reasons.
1151 (substitute* "cmake/abi_check.cmake"
1152 (("RUN_ABI_CHECK 1")
1153 "RUN_ABI_CHECK 0"))))
1154 (add-after 'install 'remove-extra-binaries
1155 (lambda _
1156 ;; Remove the 3 *_embedded files, which weigh in at
1157 ;; 14 MiB each.
1158 (for-each delete-file
1159 (find-files (string-append #$output "/bin")
1160 "_embedded$"))))
1161 (add-after 'install 'wrap-mysql_helpers
1162 (lambda* (#:key inputs outputs #:allow-other-keys)
1163 (let ((bin (string-append #$output "/bin"))
1164 (gawk (search-input-file inputs "bin/gawk"))
1165 (coreutils (search-input-file inputs "bin/ls"))
1166 (grep (search-input-file inputs "bin/grep"))
1167 (ps (search-input-file inputs "bin/ps"))
1168 (sed (search-input-file inputs "bin/sed")))
1169 (wrap-program (search-input-file outputs "bin/mysql_config")
1170 `("PATH" suffix
1171 ,(list (dirname gawk)
1172 (dirname coreutils)
1173 (dirname sed))))
1174 (wrap-program (search-input-file outputs "bin/mysqld_safe")
1175 `("PATH" suffix
1176 ,(list (dirname gawk)
1177 (dirname coreutils)
1178 (dirname grep)
1179 (dirname ps)
1180 (dirname sed)))))))
1181 (add-after 'install 'fix-permissions
1182 ;; XXX: Otherwise, the guix daemon reports: "suspicious ownership
1183 ;; or permission on `/gnu/store/...-mysql-9.7.0'; rejecting this
1184 ;; build output".
1185 (lambda _
1186 (chmod #$output #o755))))))
1187 (native-inputs
1188 (list bison perl pkg-config))
1189 (inputs
1190 (list bash-minimal
1191 boost
1192 coreutils
1193 curl
1194 cyrus-sasl
1195 gawk
1196 grep
1197 icu4c
1198 libaio
1199 libedit
1200 libfido2
1201 libtirpc
1202 lz4
1203 mit-krb5
1204 ncurses
1205 openldap
1206 openssl
1207 protobuf
1208 procps
1209 rpcsvc-proto ; rpcgen
1210 sed
1211 zlib
1212 `(,zstd "lib")))
1213 (home-page "https://www.mysql.com/")
1214 (synopsis "Fast, easy to use, and popular database")
1215 (description
1216 "MySQL is a fast, reliable, and easy to use relational database
1217management system that supports the standardized Structured Query
1218Language.")
1219 (license license:gpl2))) ;v2 only -- see 'Election of GPLv2' in LICENSE
1220
1221(define-public mysql-connector-python
1222 (package
1223 (name "mysql-connector-python")
1224 (version "9.7.0")
1225 (source
1226 (origin
1227 (method git-fetch)
1228 (uri (git-reference
1229 (url "https://github.com/mysql/mysql-connector-python")
1230 (commit version)))
1231 (file-name (git-file-name name version))
1232 (sha256
1233 (base32 "0zdm35apj1cfraxwlqfmr04pm87qpw73ilb8p88cn08zsa8q11hg"))))
1234 (build-system pyproject-build-system)
1235 (arguments
1236 (list
1237 #:phases
1238 #~(modify-phases %standard-phases
1239 (add-after 'unpack 'chdir
1240 (lambda _
1241 ;; Our protobuf is too old for the mysqlx dev API, so use the
1242 ;; classic one without the C modules.
1243 (chdir "mysql-connector-python")))
1244 (add-before 'check 'regenerate-certificate
1245 (lambda* (#:key inputs outputs #:allow-other-keys)
1246 (with-directory-excursion "tests/data/ssl"
1247 (substitute* "./generate.sh"
1248 (("which openssl")
1249 (search-input-file inputs "bin/openssl"))
1250 (("\\$OPENSSL")
1251 (search-input-file inputs "bin/openssl")))
1252 ;; Use `make-file-executable' from guix/guix!7224 after
1253 ;; core-packages-team is merged.
1254 (chmod "./generate.sh" #o555)
1255 (invoke "./generate.sh"))))
1256 (replace 'check
1257 (lambda* (#:key tests? #:allow-other-keys)
1258 (when tests?
1259 ;; Some of these tests might be failing due to the build
1260 ;; container's restrictions, others are due to the version
1261 ;; mismatch.
1262 (mkdir-p "/tmp/datadir")
1263 (invoke "python3" "unittests.py"
1264 "--verbosity=3"
1265 (string-append "--with-mysql="
1266 #$(this-package-input "mysql"))
1267 "--keep"
1268 "--mysql-topdir=/tmp/datadir"
1269 "--unix-socket=/tmp/datadir")))))))
1270 (native-inputs (list python-setuptools))
1271 (inputs (list mysql openssl zlib `(,zstd "lib")))
1272 (home-page "https://dev.mysql.com/doc/connector-python/en/index.html")
1273 (synopsis "MySQL driver written in Python")
1274 (description "MySQL Connector/Python enables Python programs to access
1275MySQL databases, using an API that is compliant with the Python Database API
1276Specification v2.0 (PEP 249).")
1277 (license license:gpl2)))
1278
1279(define-deprecated-package python-mysql-connector-python
1280 mysql-connector-python)
1281
1282(define-public mariadb
1283 (package
1284 (name "mariadb")
1285 (version "10.11.19")
1286 (source (origin
1287 (method url-fetch)
1288 (uri (string-append "https://archive.mariadb.org/mariadb-"
1289 version "/source/mariadb-" version ".tar.gz"))
1290 (sha256
1291 (base32
1292 "0ri0xmla2575bq2akdz7cx6nxs8gkvs2ccjnzlfgp06kd7p47rdq"))
1293 (modules '((guix build utils)))
1294 (snippet
1295 '(begin
1296 ;; Delete bundled libraries, but preserve CMakeLists.txt.
1297 (for-each (lambda (file)
1298 (unless (string-suffix? "CMakeLists.txt" file)
1299 (delete-file file)))
1300 (append (find-files "extra/wolfssl")
1301 (find-files "zlib")))))))
1302 (build-system cmake-build-system)
1303 (outputs '("out" "lib" "dev"))
1304 (arguments
1305 `(#:configure-flags
1306 (list
1307 "-DBUILD_CONFIG=mysql_release"
1308
1309 ;; Ensure the system libraries are used.
1310 "-DWITH_JEMALLOC=yes"
1311 "-DWITH_LIBFMT=system"
1312 "-DWITH_PCRE=system"
1313 "-DWITH_SSL=system"
1314 "-DWITH_ZLIB=system"
1315
1316 "-DDEFAULT_CHARSET=utf8"
1317 "-DDEFAULT_COLLATION=utf8_general_ci"
1318 "-DMYSQL_DATADIR=/var/lib/mysql"
1319 "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
1320
1321 ;; Do not install the benchmark suite.
1322 "-DINSTALL_SQLBENCHDIR=false"
1323
1324 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
1325 (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
1326 "/lib")
1327 (string-append "-DINSTALL_INFODIR=" (assoc-ref %outputs "out")
1328 "/share/mysql/docs")
1329 (string-append "-DINSTALL_MANDIR=" (assoc-ref %outputs "out")
1330 "/share/man")
1331 (string-append "-DINSTALL_SCRIPTDIR=" (assoc-ref %outputs "out") "/bin")
1332 (string-append "-DINSTALL_BINDIR=" (assoc-ref %outputs "out") "/bin")
1333 "-DCMAKE_INSTALL_LIBDIR=lib"
1334 "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
1335 (string-append "-DINSTALL_INCLUDEDIR=" (assoc-ref %outputs "dev")
1336 "/include/mysql")
1337 (string-append "-DINSTALL_DOCREADMEDIR=" (assoc-ref %outputs "out")
1338 "/share/mysql/docs")
1339 (string-append "-DINSTALL_DOCDIR=" (assoc-ref %outputs "out")
1340 "/share/mysql/docs")
1341 (string-append "-DINSTALL_SUPPORTFILESDIR=" (assoc-ref %outputs "out")
1342 "/share/mysql/support-files")
1343 "-DINSTALL_MYSQLSHAREDIR=share/mysql"
1344 "-DINSTALL_SHAREDIR=share")
1345 ;; The test suite has spurious failures (mostly timeouts) if run in
1346 ;; parallel on various machines. Only enable parallel tests on
1347 ;; architectures which are likely to not have this issue.
1348 #:parallel-tests? ,(target-x86-64?)
1349 #:phases
1350 (modify-phases %standard-phases
1351 (add-after 'unpack 'adjust-output-references
1352 (lambda _
1353 ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
1354 ;; to other variables such as $INSTALL_INCLUDEDIR, which does
1355 ;; not work when the latter uses an absolute file name.
1356 (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
1357 (("%s/@INSTALL_INCLUDEDIR@")
1358 (string-append "@INSTALL_INCLUDEDIR@"))
1359 ;; As of 10.5.8, the mariadb_config program tries to be
1360 ;; clever and computes the installation directory relative
1361 ;; to /proc/self/exe when running on Linux. Make it fall
1362 ;; back to the old behaviour.
1363 (("defined\\(__linux__\\)")
1364 "0"))
1365 (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
1366 (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
1367 "@INSTALL_INCLUDEDIR@"))
1368 (substitute* "support-files/mariadb.pc.in"
1369 (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir)
1370 (string-append dir "dir=")))
1371 (substitute* "include/CMakeLists.txt"
1372 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
1373 "${INSTALL_INCLUDEDIR}"))
1374 (substitute* "cmake/mariadb_connector_c.cmake"
1375 (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
1376 "${INSTALL_BINDIR}"))))
1377 (add-after 'unpack 'adjust-tests
1378 (lambda _
1379 (let ((disabled-tests
1380 '(;; These fail because root@hostname == root@localhost in
1381 ;; the build environment, causing a user count mismatch.
1382 ;; They are fixed in version 11.8.3:
1383 ;; <https://jira.mariadb.org/browse/MDEV-7761>.
1384 "main.explain_non_select"
1385 "main.upgrade_MDEV-19650"
1386 "roles.acl_statistics"
1387 "main.stat_tables_innodb"
1388 "main.stat_tables"
1389 "main.mysql_upgrade"
1390 "main.selectivity_no_engine"
1391
1392 ;; FIXME: These tests check various table encodings and
1393 ;; fails because Guix defaults to UTF8 instead of the
1394 ;; upstream default latin1_swedish_ci. It's not easily
1395 ;; substitutable because several encodings are tested.
1396 "main.system_mysql_db"
1397 "main.mysqldump-header"
1398
1399 ;; These test sometimes fail.
1400 "main.log_slow"
1401 "main.mysqld--help-aria"
1402
1403 ;; XXX: This test occasionally fails on i686-linux:
1404 ;; <https://jira.mariadb.org/browse/MDEV-24458>
1405 ,@(if (string-prefix? "i686" (%current-system))
1406 '("main.myisampack")
1407 '())))
1408
1409 ;; This file contains a list of known-flaky tests for this
1410 ;; release. Append our own items.
1411 (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
1412 (for-each (lambda (test)
1413 (format unstable-tests "~a : ~a\n"
1414 test "Disabled in Guix"))
1415 disabled-tests)
1416 (close-port unstable-tests)
1417
1418 (substitute* "tests/mysql_client_test.c"
1419 ;; The host is not blocked by handshake max_connect_errors
1420 ;; in the build environment.
1421 ((" test_proxy_header_connect_errors_reset\\(\\);.*") ""))
1422
1423 (substitute* "mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
1424 (("/bin/bash")
1425 (which "bash")))
1426
1427 (substitute* "mysql-test/mariadb-test-run.pl"
1428 (("/bin/ls") (which "ls"))
1429 (("/bin/sh") (which "sh"))))))
1430 (replace 'check
1431 (lambda* (#:key (tests? #t) parallel-tests? #:allow-other-keys)
1432 (if tests?
1433 (with-directory-excursion "mysql-test"
1434 (invoke "./mariadb-test-run"
1435 "--verbose"
1436 "--retry=3"
1437 "--suite=main"
1438 "--testcase-timeout=40"
1439 "--suite-timeout=600"
1440 "--parallel" (number->string (if parallel-tests?
1441 ;; See guix/guix#5680.
1442 (min 64 (parallel-job-count))
1443 1))
1444 ;; Skip the replication tests: they are very I/O
1445 ;; intensive and frequently causes indeterministic
1446 ;; failures even on powerful hardware.
1447 "--skip-rpl"
1448 "--skip-test-list=unstable-tests"))
1449 (format #t "test suite not run~%"))))
1450 (add-after 'install 'post-install
1451 (lambda* (#:key inputs outputs #:allow-other-keys)
1452 (let ((out (assoc-ref outputs "out"))
1453 (dev (assoc-ref outputs "dev"))
1454 (lib (assoc-ref outputs "lib"))
1455 (openssl (dirname (search-input-file inputs "lib/libssl.so"))))
1456 (substitute* (list (string-append out "/bin/mariadb-install-db")
1457 (string-append out "/bin/mysql_install_db"))
1458 (("basedir=\"\"")
1459 (string-append "basedir=\"" out "\""))
1460 (("\\$basedir/share/mysql")
1461 (string-append lib "/share/mysql"))
1462 (("bindir=\"\\$basedir//") "bindir=\"/"))
1463
1464 (with-directory-excursion lib
1465 ;; Remove tests.
1466 (delete-file-recursively "mysql-test")
1467 ;; Remove static libraries.
1468 (for-each delete-file (find-files "lib" "\\.a$")))
1469
1470 (with-directory-excursion out
1471 (delete-file "share/man/man1/mysql-test-run.pl.1")
1472 ;; Delete huge and unnecessary executables.
1473 (for-each delete-file (find-files "bin" "test$")))
1474 (mkdir-p (string-append dev "/share"))
1475 (mkdir-p (string-append dev "/bin"))
1476 (rename-file (string-append lib "/bin/mariadbd")
1477 (string-append out "/bin/mariadbd"))
1478 (rename-file (string-append lib "/bin/mysqld")
1479 (string-append out "/bin/mysqld"))
1480 (mkdir-p (string-append dev "/lib"))
1481 (rename-file (string-append lib "/lib/pkgconfig")
1482 (string-append dev "/lib/pkgconfig"))
1483 (rename-file (string-append out "/bin/mariadb_config")
1484 (string-append dev "/bin/mariadb_config"))
1485 (rename-file (string-append out "/bin/mysql_config")
1486 (string-append dev "/bin/mysql_config"))
1487
1488 ;; Embed an absolute reference to OpenSSL in mysql_config
1489 ;; and the pkg-config file to avoid propagation.
1490 ;; XXX: how to do this for mariadb_config.c.in?
1491 (substitute* (list (string-append dev "/bin/mysql_config")
1492 (string-append dev "/lib/pkgconfig/mariadb.pc"))
1493 (("-lssl -lcrypto" all)
1494 (string-append "-L" openssl " " all)))))))))
1495 (native-inputs
1496 `(("bison" ,bison)
1497 ("perl" ,perl)))
1498 (inputs
1499 (list fmt
1500 jemalloc
1501 libaio
1502 libxml2
1503 ncurses
1504 openssl
1505 linux-pam
1506 pcre2
1507 xz
1508 zlib))
1509 ;; The test suite is very resource intensive and can take more than three
1510 ;; hours on a x86_64 system. Give slow and busy machines some leeway.
1511 (properties '((timeout . 64800))) ;18 hours
1512 (home-page "https://mariadb.org/")
1513 (synopsis "SQL database server")
1514 (description
1515 "MariaDB is a multi-user and multi-threaded SQL database server, designed
1516as a drop-in replacement of MySQL.")
1517 (license license:gpl2)))
1518
1519(define-public mariadb-embedded
1520 (package/inherit mariadb
1521 (name "mariadb-embedded")
1522 (arguments
1523 (substitute-keyword-arguments arguments
1524 ((#:configure-flags flags)
1525 #~(append '("-DWITH_EMBEDDED_SERVER=ON") #$flags))))))
1526
1527(define-public mariadb-connector-c
1528 (package
1529 (name "mariadb-connector-c")
1530 (version "3.4.5")
1531 (source
1532 (origin
1533 (method url-fetch)
1534 (uri (string-append
1535 "https://downloads.mariadb.org/rest-api/connector-c/"
1536 version "/mariadb-connector-c-" version "-src.tar.gz"))
1537 (file-name (string-append name "-" version ".tar.gz"))
1538 (sha256
1539 (base32 "18y1x985pnvvirmwfka81ygsvl7isc52mj9c9hvc69fb2qw1jzmi"))))
1540 (inputs
1541 (list openssl))
1542 (build-system cmake-build-system)
1543 (arguments
1544 '(#:tests? #f)) ; no tests
1545 (home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
1546 (synopsis "Client library to connect to MySQL or MariaDB")
1547 (description "The MariaDB Connector/C is used to connect applications
1548developed in C/C++ to MariaDB and MySQL databases.")
1549 (license license:lgpl2.1+)))
1550
1551(define-public galera
1552 (package
1553 (name "galera")
1554 (version "26.4.18")
1555 (source (origin
1556 (method git-fetch)
1557 (uri (git-reference
1558 (url "https://github.com/codership/galera")
1559 (commit (string-append "release_" version))
1560 (recursive? #t)))
1561 (file-name (git-file-name name version))
1562 (sha256
1563 (base32 "1agw763qx9778krcpmgvwcps73ipyjwl0niwsykcxldvzzs314r5"))))
1564 (build-system cmake-build-system)
1565 (inputs
1566 (list boost openssl))
1567 (native-inputs
1568 (list check))
1569 (home-page "https://github.com/codership/galera/")
1570 (synopsis "Extension to the MariaDB database server")
1571 (description
1572 "Galera is a wsrep-provider that is used with MariaDB for load-balancing
1573and high-availability (HA).")
1574 (license license:gpl2))) ;'COPYING' says "version 2" only
1575
1576;; Don't forget to update the other postgresql packages when upgrading this one.
1577(define-public postgresql-17
1578 (package
1579 (name "postgresql")
1580 (version "17.10")
1581 (source (origin
1582 (method url-fetch)
1583 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1584 version "/postgresql-" version ".tar.bz2"))
1585 (sha256
1586 (base32
1587 "144cb40gn1lasvz0jvz4i72mda8k7pm1bx6azq2vggfddm8h72h7"))
1588 (patches (search-patches
1589 "postgresql-disable-normalize_exec_path.patch"))))
1590 (build-system gnu-build-system)
1591 (arguments
1592 (list
1593 #:configure-flags
1594 #~(list "--with-uuid=e2fs" "--with-openssl"
1595 (string-append "--mandir=" #$output "/share/man")
1596 ;; PostgreSQL installs its own Makefile (should it?).
1597 ;; Prevent it from retaining needless references to
1598 ;; the build tools in order to save size.
1599 "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
1600 "LD=ld" "TAR=tar")
1601 #:phases
1602 #~(modify-phases %standard-phases
1603 (add-before 'configure 'patch-/bin/sh
1604 (lambda _
1605 ;; Refer to the actual shell.
1606 (substitute* '("src/bin/pg_ctl/pg_ctl.c"
1607 "src/bin/psql/command.c")
1608 (("/bin/sh") (which "sh")))))
1609 (add-before 'configure 'set-socket-dir
1610 (lambda _
1611 (substitute* '("src/include/pg_config_manual.h")
1612 (("DEFAULT_PGSOCKET_DIR[^\n]*")
1613 "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\""))))
1614 (add-after 'build 'build-contrib
1615 (lambda _
1616 (invoke "make" "-C" "contrib")))
1617 ;; FIXME: Install manpages too.
1618 ;; The 'install-mangpages phase in postgresql-16 fails silently here.
1619 (add-after 'install 'install-contrib
1620 (lambda _
1621 (invoke "make" "-C" "contrib" "install"))))))
1622 (native-inputs
1623 (list bison
1624 flex
1625 libxml2
1626 libxslt
1627 perl
1628 pkg-config
1629 texinfo))
1630 (inputs
1631 (list icu4c readline `(,util-linux "lib") zlib))
1632 (propagated-inputs (list openssl)) ;in Requires.private of libpq.pc
1633 (home-page "https://www.postgresql.org/")
1634 (synopsis "Powerful object-relational database system")
1635 (description
1636 "PostgreSQL is a powerful object-relational database system. It is fully
1637ACID compliant, has full support for foreign keys, joins, views, triggers, and
1638stored procedures (in multiple languages). It includes most SQL:2008 data
1639types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and
1640TIMESTAMP. It also supports storage of binary large objects, including
1641pictures, sounds, or video.")
1642 (license (license:x11-style "file://COPYRIGHT"))))
1643
1644(define-public postgresql-16
1645 (package
1646 (inherit postgresql-17)
1647 (name "postgresql")
1648 (version "16.14")
1649 (source (origin
1650 (method url-fetch)
1651 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1652 version "/postgresql-" version ".tar.bz2"))
1653 (sha256
1654 (base32
1655 "0w9lgsn03m4k0v3m622v7fk3gqbfbjvwv34mrrc0i4ip4wa7gl7n"))
1656 (patches (search-patches
1657 "postgresql-disable-normalize_exec_path.patch"))))
1658 (arguments
1659 (substitute-keyword-arguments (package-arguments postgresql-17)
1660 ((#:phases phases #~%standard-phases)
1661 #~(modify-phases #$phases
1662 (add-after 'install 'install-manuals
1663 (lambda _
1664 (with-directory-excursion "doc/src/sgml"
1665 (invoke "make" "install-man")
1666 (invoke "make" "postgres.info")
1667 (install-file "postgres.info"
1668 (string-append #$output "/share/info")))))))))
1669 (native-inputs (modify-inputs (package-native-inputs postgresql-17)
1670 (append docbook-xml-4.5)
1671 (append docbook2x)
1672 (delete "bison")
1673 (delete "flex")
1674 (delete "libxslt")))))
1675
1676(define-public postgresql-15
1677 (package
1678 (inherit postgresql-16)
1679 (name "postgresql")
1680 (version "15.18")
1681 (source (origin
1682 (method url-fetch)
1683 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1684 version "/postgresql-" version ".tar.bz2"))
1685 (sha256
1686 (base32
1687 "1d13qckpslfqamdmp23q3rbzxlp1rqwszylilyllpsp3gzwhvpqi"))
1688 (patches (search-patches
1689 "postgresql-disable-resolve_symlinks.patch"))))
1690 (native-inputs (modify-inputs native-inputs
1691 (delete "pkg-config")))
1692 (inputs (modify-inputs inputs
1693 (delete "icu4c")))))
1694
1695(define-public postgresql-14
1696 (package
1697 (inherit postgresql-15)
1698 (name "postgresql")
1699 (version "14.23")
1700 (source (origin
1701 (inherit (package-source postgresql-15))
1702 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1703 version "/postgresql-" version ".tar.bz2"))
1704 (sha256
1705 (base32
1706 "19clihp73ak2p5di90jhg50lqjkkr0iy349gkki30qsl5f11cwnc"))))))
1707
1708(define-deprecated/public postgresql-13 #f
1709 (package
1710 (inherit postgresql-14)
1711 (version "13.23")
1712 (source (origin
1713 (inherit (package-source postgresql-14))
1714 (uri (string-append "https://ftp.postgresql.org/pub/source/v"
1715 version "/postgresql-" version ".tar.bz2"))
1716 (sha256
1717 (base32
1718 "1mhz0h7b3dmc0nnxz1wp46j95jhyi3girykkr3gbg4mg4qkwihvf"))))))
1719
1720(define-public postgresql postgresql-14)
1721
1722(define-public libpg-query-17
1723 (package
1724 (name "libpg-query")
1725 (version "17-6.0.0")
1726 (source (origin
1727 (method git-fetch)
1728 (uri (git-reference
1729 (url "https://github.com/pganalyze/libpg_query.git")
1730 (commit version)))
1731 (file-name (git-file-name name version))
1732 (sha256
1733 (base32
1734 "1y4594pf2wl88m66z9xhxzmm675408dbw7bkg4snfcifij97f0c7"))))
1735 (build-system gnu-build-system)
1736 (arguments
1737 (list #:tests? #f ; tests run as part of build
1738 #:make-flags
1739 #~(list (string-append "prefix=" #$output))
1740 #:phases
1741 #~(modify-phases %standard-phases
1742 (replace 'configure
1743 (lambda _
1744 (setenv "CC" #$(cc-for-target)))))))
1745 (native-inputs
1746 (list which))
1747 (synopsis "Postgres SQL parser")
1748 (description "This package provides a Postgres SQL parser as a library.")
1749 (home-page "https://github.com/pganalyze/libpg_query")
1750 (license license:bsd-3)))
1751
1752(define-public libpg-query libpg-query-17)
1753
1754(define-public timescaledb
1755 (package
1756 (name "timescaledb")
1757 (version "2.26.1")
1758 (source (origin
1759 (method git-fetch)
1760 (uri (git-reference
1761 (url "https://github.com/timescale/timescaledb")
1762 (commit version)))
1763 (file-name (git-file-name name version))
1764 (sha256
1765 (base32
1766 "0zfm224jyz874pk4r9qlz5c2mn1xjvairhxh6widlbh3mn62m3j8"))
1767 (modules '((guix build utils)))
1768 (snippet
1769 ;; Remove files carrying the proprietary TIMESCALE license.
1770 '(begin
1771 (delete-file-recursively "tsl")
1772 (for-each delete-file
1773 '("scripts/c_license_header-timescale.h"
1774 "scripts/license_tsl.spec"
1775 "scripts/sql_license_tsl.sql"
1776 "test/t/001_replication_telemetry.pl"
1777 "test/perl/TimescaleNode.pm"))))))
1778 (build-system cmake-build-system)
1779 (arguments
1780 (list #:imported-modules `((guix build union)
1781 ,@%cmake-build-system-modules)
1782 #:modules `(,@%cmake-build-system-modules
1783 ((guix build gnu-build-system) #:prefix gnu:)
1784 (guix build utils)
1785 (guix build union)
1786 (ice-9 match))
1787 #:configure-flags #~(list "-DAPACHE_ONLY=ON"
1788 "-DSEND_TELEMETRY_DEFAULT=OFF")
1789 #:phases
1790 #~(modify-phases (@ (guix build cmake-build-system) %standard-phases)
1791 (add-after 'unpack 'patch-install-location
1792 (lambda _
1793 ;; Install extension to the output instead of the
1794 ;; PostgreSQL store directory.
1795 (substitute* '("CMakeLists.txt"
1796 "cmake/GenerateScripts.cmake"
1797 "sql/CMakeLists.txt")
1798 (("\\$\\{PG_SHAREDIR\\}/extension")
1799 (string-append #$output "/share/extension")))
1800 ;; Likewise for the library.
1801 (substitute* '("src/CMakeLists.txt"
1802 "src/loader/CMakeLists.txt")
1803 (("\\$\\{PG_PKGLIBDIR\\}")
1804 (string-append #$output "/lib")))))
1805 (add-after 'unpack 'remove-kernel-version
1806 ;; Do not embed the running kernel version for reproducible
1807 ;; builds
1808 (lambda _
1809 (substitute* "src/config.h.in"
1810 (("BUILD_OS_VERSION ..CMAKE_SYSTEM_VERSION.")
1811 "BUILD_OS_VERSION \""))))
1812 ;; Run the tests after install to make it easier to create the
1813 ;; required PostgreSQL+TimescaleDB filesystem union.
1814 (delete 'check)
1815 (add-after 'install 'prepare-tests
1816 (lambda* (#:key inputs #:allow-other-keys)
1817 (let ((pg-data (string-append (getcwd) "/../pg-data"))
1818 (pg-union (string-append (getcwd) "/../pg-union")))
1819 (match inputs
1820 (((names . directories) ...)
1821 (union-build pg-union (cons #$output directories))))
1822 (setenv "PATH" (string-append pg-union "/bin:"
1823 (getenv "PATH")))
1824 (invoke "initdb" "-D" pg-data)
1825 (copy-file "test/postgresql.conf"
1826 (string-append pg-data "/postgresql.conf"))
1827
1828 (invoke "pg_ctl" "-D" pg-data
1829 "-o" (string-append "-k " pg-data)
1830 "-l" (string-append pg-data "/db.log")
1831 "start"))))
1832 #$@(cond
1833 ((string=? "x86-64-linux" (%current-system))
1834 #~())
1835 ((member (%current-system)
1836 (list "aarch64-linux" "i686-linux"))
1837 #~((add-after 'unpack 'skip-failing-tests
1838 (lambda _
1839 (substitute* "test/sql/CMakeLists.txt"
1840 (((string-append
1841 "("
1842 (string-join
1843 '(" append\\.sql\\.in"
1844 " chunk_adaptative\\.sql"
1845 " histogram_test\\.sql\\.in")
1846 "|")
1847 ")")
1848 all)
1849 (string-append "#" all)))))))
1850 (else
1851 #~((add-after 'unpack 'skip-failing-tests
1852 (lambda _
1853 (substitute* "test/sql/CMakeLists.txt"
1854 (("histogram_test\\.sql\\.in")
1855 "#histogram_test.sql.in")))))))
1856 (add-after 'prepare-tests 'check
1857 (lambda* (#:rest args)
1858 (apply (assoc-ref gnu:%standard-phases 'check)
1859 #:test-target "regresschecklocal" args))))))
1860 (inputs (list openssl postgresql-17))
1861 (home-page "https://www.timescale.com/")
1862 (synopsis "Time-series extension for PostgreSQL")
1863 (description
1864 "TimescaleDB is a database designed to make SQL scalable for
1865time-series data. It is engineered up from PostgreSQL and packaged as a
1866PostgreSQL extension, providing automatic partitioning across time and space
1867(partitioning key), as well as full SQL support.")
1868 (license license:asl2.0)))
1869
1870(define-public pgvector
1871 (package
1872 (name "pgvector")
1873 (version "0.6.0")
1874 (source (origin
1875 (method git-fetch)
1876 (uri (git-reference
1877 (url "https://github.com/pgvector/pgvector")
1878 (commit (string-append "v" version))))
1879 (file-name (git-file-name name version))
1880 (sha256
1881 (base32
1882 "19zcjrlmyj7gfbn8prh014yq50iy4dg97pirsm7idxsr829vwyc5"))))
1883 (build-system gnu-build-system)
1884 (arguments
1885 (list
1886 ;; Do not use -march=native
1887 #:make-flags
1888 '(list "OPTFLAGS=")
1889 #:phases
1890 #~(modify-phases %standard-phases
1891 (delete 'configure)
1892 (replace 'install
1893 (lambda _
1894 (let ((extension (string-append #$output "/share/extension"))
1895 (lib (string-append #$output "/lib"))
1896 (headers (string-append #$output "/include/server/extension/vector")))
1897 (for-each mkdir-p (list extension lib headers))
1898 (install-file "vector.so" lib)
1899 (chmod (string-append lib "/vector.so") #o755)
1900 (install-file "vector.control" extension)
1901 (for-each (lambda (file)
1902 (install-file file extension))
1903 (find-files "sql" "\\.sql$"))
1904 (install-file "src/vector.h" headers)))))))
1905 (inputs (list postgresql))
1906 (home-page "https://github.com/pgvector/pgvector")
1907 (synopsis "Vector similarity search for Postgres")
1908 (description
1909 "This package provides a vector similarity search extension for Postgres.
1910Store your vectors with the rest of your data. It supports:
1911
1912@itemize
1913@item exact and approximate nearest neighbor search;
1914@item L2 distance, inner product, and cosine distance;
1915@item any language with a Postgres client.
1916@end itemize
1917")
1918 (license (license:x11-style "file://COPYRIGHT"))))
1919
1920(define-public pgloader
1921 (package
1922 (name "pgloader")
1923 (version "3.6.9")
1924 (source
1925 (origin
1926 (method git-fetch)
1927 (uri (git-reference
1928 (url "https://github.com/dimitri/pgloader")
1929 (commit (string-append "v" version))))
1930 (sha256
1931 (base32 "03kp3ms2sjz4gwb94xs404mi63fnv1bq00hyqxyvc9csmicxzawn"))
1932 (file-name (git-file-name name version))))
1933 (build-system gnu-build-system)
1934 (arguments
1935 ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being
1936 ;; dependent on Quicklisp, main build target is `pgloader-standalone' which
1937 ;; does not require Quicklisp workarounds. There is no `install' target
1938 ;; configured in Makefile.
1939 (list #:tests? #f
1940 #:strip-binaries? #f
1941 #:make-flags
1942 #~(list "pgloader-standalone" "BUILDAPP_SBCL=buildapp")
1943 #:phases
1944 #~(modify-phases %standard-phases
1945 (delete 'configure)
1946 (add-after 'unpack 'set-home
1947 (lambda _
1948 (setenv "HOME" "/tmp")))
1949 (add-after 'unpack 'patch-Makefile
1950 (lambda _
1951 (substitute* "Makefile"
1952 (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n"))))
1953 (replace 'install
1954 (lambda* (#:key outputs #:allow-other-keys)
1955 (let ((bin (string-append #$output "/bin")))
1956 (mkdir-p bin)
1957 (install-file "build/bin/pgloader" bin)))))))
1958 (native-inputs
1959 (list buildapp sbcl))
1960 (inputs
1961 (list sbcl-alexandria
1962 sbcl-cl-abnf
1963 sbcl-cl-base64
1964 sbcl-cl-csv
1965 sbcl-cl-fad
1966 sbcl-cl-log
1967 sbcl-cl-markdown
1968 sbcl-cl-mustache
1969 sbcl-cl-ppcre
1970 sbcl-cl-sqlite
1971 sbcl-closer-mop
1972 sbcl-command-line-arguments
1973 sbcl-db3
1974 sbcl-drakma
1975 sbcl-esrap
1976 sbcl-flexi-streams
1977 sbcl-ixf
1978 sbcl-local-time
1979 sbcl-lparallel
1980 sbcl-metabang-bind
1981 sbcl-mssql
1982 sbcl-postmodern
1983 sbcl-py-configparser
1984 sbcl-qmynd
1985 sbcl-quri
1986 sbcl-split-sequence
1987 sbcl-trivial-backtrace
1988 sbcl-usocket
1989 sbcl-uuid
1990 sbcl-yason
1991 sbcl-zs3))
1992 (home-page "https://pgloader.io/")
1993 (synopsis "Tool to migrate data to PostgreSQL")
1994 (description
1995 "@code{pgloader} is a program that can load data or migrate databases from
1996CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.")
1997 (license (license:x11-style "file://LICENSE"))))
1998
1999(define-public postgresql-backup-scripts
2000 (package
2001 (name "postgresql-backup-scripts")
2002 (version "0.0.1")
2003 (source
2004 (origin
2005 (method git-fetch)
2006 (uri (git-reference
2007 (url (string-append "https://codeberg.org/fishinthecalculator/"
2008 "postgresql-backup-scripts"))
2009 (commit version)))
2010 (file-name (git-file-name name version))
2011 (sha256
2012 (base32 "0ig19345p9h2z56k07i6g94pls2b4fhxacf1i8f0hxvk2p4x730k"))))
2013 (build-system copy-build-system)
2014 (arguments
2015 (list
2016 #:install-plan #~'(("./src/" "/bin")
2017 ("./examples" "/share/examples"))
2018 #:phases
2019 #~(modify-phases %standard-phases
2020 (add-after 'install 'chmod
2021 (lambda _
2022 (for-each
2023 (lambda (file) (chmod file #o755))
2024 (find-files (string-append #$output "/bin")))))
2025 (add-after 'chmod 'wrap
2026 (lambda _
2027 (let* ((bin (string-append #$output "/bin"))
2028 (inputs
2029 (list
2030 #$@(map cadr
2031 (package-inputs this-package))))
2032 (lib-directories (search-path-as-list '("lib") inputs))
2033 (bin-directories
2034 (search-path-as-list
2035 '("bin" "sbin" "libexec")
2036 inputs)))
2037 (for-each
2038 (lambda (exe)
2039 (wrap-program exe
2040 `("PATH" ":" prefix
2041 (,(string-join bin-directories ":")))
2042 `("LD_LIBRARY_PATH" ":" prefix
2043 (,(string-join lib-directories ":")))))
2044 (find-files bin))))))))
2045 (inputs
2046 (list coreutils
2047 bash-minimal
2048 findutils
2049 postgresql))
2050 (home-page "https://codeberg.org/fishinthecalculator/postgresql-backup-scripts")
2051 (synopsis "Utility scripts for PostgreSQL backups")
2052 (description
2053 "This package provides two scripts that will backup PostgreSQL databases in
2054a cluster. They are supposed to be run in scheduled jobs. @code{pg_backup.sh}
2055runs regular backups, @code{pg_backup_rotated.sh} runs rotated backups.")
2056 (license
2057 (license:x11-style "file://LICENSE"))))
2058
2059(define-public python-pymysql
2060 (package
2061 (name "python-pymysql")
2062 (version "1.1.1")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "pymysql" version))
2067 (sha256
2068 (base32 "1l2cj0ps96g3bblvhdszgyjv9bi405bxrx0bqq1p8h9bmwd629z1"))))
2069 (build-system pyproject-build-system)
2070 (native-inputs
2071 (list python-setuptools python-wheel))
2072 (propagated-inputs
2073 (list python-cryptography python-pynacl))
2074 (arguments
2075 `(#:tests? #f)) ; tests expect a running MySQL
2076 (home-page "https://github.com/PyMySQL/PyMySQL/")
2077 (synopsis "Pure-Python MySQL driver")
2078 (description
2079 "PyMySQL is a pure-Python MySQL client library, based on PEP 249.
2080Most public APIs are compatible with @command{mysqlclient} and MySQLdb.")
2081 (license license:expat)))
2082
2083(define-public qdbm
2084 (package
2085 (name "qdbm")
2086 (version "1.8.78")
2087 (source
2088 (origin
2089 (method url-fetch)
2090 (uri (string-append "http://fallabs.com/" name "/"
2091 name "-" version ".tar.gz"))
2092 (sha256
2093 (base32
2094 "0gmpvhn02pkq280ffmn4da1g4mdr1xxz7l80b7y4n7km1mrzwrml"))))
2095 (build-system gnu-build-system)
2096 (arguments
2097 `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2098 (assoc-ref %outputs "out")
2099 "/lib"))
2100 #:make-flags (list "CFLAGS=-fPIC")))
2101 (home-page "https://fallabs.com/qdbm/")
2102 (synopsis "Key-value database")
2103 (description "QDBM is a library of routines for managing a
2104database. The database is a simple data file containing key-value
2105pairs. Every key and value is serial bytes with variable length.
2106Binary data as well as character strings can be used as a key or a
2107value. There is no concept of data tables or data types. Records are
2108organized in a hash table or B+ tree.")
2109 (license license:lgpl2.1+)))
2110
2111(define-public rayforce
2112 ;; No release commit, version from include/rayforce.h
2113 (let ((revision "1")
2114 (commit "a4a4d059c0b990670462cf1b61c1d2afb1bd7b04"))
2115 (package
2116 (name "rayforce")
2117 (version (git-version "2.1.0" revision commit))
2118 (source (origin
2119 (method git-fetch)
2120 (uri (git-reference
2121 (url "https://github.com/RayforceDB/rayforce")
2122 (commit commit)))
2123 (file-name (git-file-name name version))
2124 (sha256
2125 (base32
2126 "0i2acqag83wkq2a0mbig5fq2nwas7qx3kn9bf5x9awp87hhg7n8c"))))
2127 (build-system gnu-build-system)
2128 (arguments
2129 (list #:make-flags
2130 #~(list (string-append "CC=" #$(cc-for-target))
2131 (string-append "GIT_HASH=" #$commit)
2132 "BUILD_DATE=unknown"
2133 "CFLAGS=-fPIC $(WARNS) -std=$(STD) -g -O2 \
2134 -fsanitize=address,undefined -fno-omit-frame-pointer")
2135 #:test-target "test"
2136 #:phases
2137 #~(modify-phases %standard-phases
2138 (delete 'bootstrap)
2139 (delete 'configure)
2140 (add-after 'build 'build-library
2141 (lambda* (#:key make-flags #:allow-other-keys)
2142 (apply invoke "make" "lib" make-flags)
2143 (invoke #$(cc-for-target) "-shared" "-o" "librayforce.so"
2144 "librayforce.a")))
2145 (add-before 'check 'delete-failing-tests
2146 (lambda _
2147 (with-directory-excursion "test/rfl/system"
2148 (for-each delete-file
2149 (list "ipc_diff.rfl"
2150 "log_journal.rfl"
2151 "log_journal_advanced.rfl")))))
2152 (replace 'install
2153 (lambda _
2154 (install-file "rayforce"
2155 (string-append #$output "/bin"))
2156 (install-file "librayforce.a"
2157 (string-append #$output "/lib"))
2158 (install-file "librayforce.so"
2159 (string-append #$output "/lib"))
2160 (install-file "include/rayforce.h"
2161 (string-append #$output "/include")))))))
2162 (native-inputs (list gawk grep python))
2163 (home-page "https://rayforcedb.com")
2164 (synopsis "Column analytics and graph traversal engine")
2165 (description "Rayforce is a combined engine for performing computations
2166on tables and graphs. It features a Lisp-like language for performing queries
2167and operations.")
2168 (license license:expat))))
2169
2170(define-public recutils
2171 (package
2172 (name "recutils")
2173 (version "1.9")
2174 (source (origin
2175 (method url-fetch)
2176 (uri (string-append "mirror://gnu/recutils/recutils-"
2177 version ".tar.gz"))
2178 (sha256
2179 (base32
2180 "03kf91f20brn2ffljfjzirxh5xj99m1mvvspcx2lph9000mmj0b3"))))
2181 (build-system gnu-build-system)
2182 (arguments
2183 (list #:configure-flags
2184 #~(list "--disable-static"
2185 (string-append "--with-bash-headers="
2186 (search-input-directory %build-inputs
2187 "include/bash"))
2188 ;; Add CFLAGS to relax gcc-14's strictness.
2189 (string-append "CFLAGS=-g -O2"
2190 " -Wno-error=implicit-function-declaration"
2191 " -Wno-error=incompatible-pointer-types"))
2192 #:phases
2193 #~(modify-phases %standard-phases
2194 (add-after 'install 'symlink-bash-loadables
2195 (lambda* (#:key outputs #:allow-other-keys)
2196 (with-directory-excursion (string-append
2197 (assoc-ref outputs "out")
2198 "/lib")
2199 (mkdir "bash")
2200 (for-each
2201 (compose symlink
2202 (lambda (loadable)
2203 (values
2204 (string-append (getcwd) "/" loadable ".so")
2205 (string-append "bash/" loadable))))
2206 '("readrec" "testrec"))))))))
2207 (native-inputs
2208 (list bc check-0.14 pkg-config))
2209 (inputs
2210 ;; TODO: Add more optional inputs.
2211 (list bash ; /bin/bash for native compilation
2212 `(,bash "include")
2213 curl
2214 libgcrypt
2215 `(,util-linux "lib")))
2216 (synopsis "Manipulate plain text files as databases")
2217 (description
2218 "GNU Recutils is a set of tools and libraries for creating and
2219manipulating text-based, human-editable databases. Despite being text-based,
2220databases created with Recutils carry all of the expected features such as
2221unique fields, primary keys, time stamps and more. Many different field
2222types are supported, as is encryption.")
2223 (license license:gpl3+)
2224 (home-page "https://www.gnu.org/software/recutils/")))
2225
2226(define-public emacs-rec-mode
2227 (package
2228 (name "emacs-rec-mode")
2229 (version "1.9.4")
2230 (source (origin
2231 (method url-fetch)
2232 (uri (string-append "https://elpa.gnu.org/packages/"
2233 "rec-mode-" version ".tar"))
2234 (sha256
2235 (base32
2236 "0pi483g5qgz6gvyi13a4ldfbkaad3xkad08aqfcnmsdylvc9zzma"))
2237 (snippet #~(begin (delete-file "rec-mode.info")))))
2238 (build-system emacs-build-system)
2239 (arguments
2240 (list
2241 #:phases
2242 #~(modify-phases %standard-phases
2243 (add-after 'unpack 'patch-program-paths
2244 (lambda* (#:key inputs #:allow-other-keys)
2245 (emacs-substitute-variables "rec-mode.el"
2246 ("rec-recfix" (search-input-file inputs "bin/recfix"))
2247 ("rec-recinf" (search-input-file inputs "bin/recinf"))
2248 ("rec-recsel" (search-input-file inputs "bin/recsel")))))
2249 (add-before 'install 'make-info
2250 (lambda _
2251 (invoke "makeinfo" "--no-split"
2252 "-o" "rec-mode.info" "rec-mode.texi"))))))
2253 (inputs (list recutils))
2254 (native-inputs (list texinfo))
2255 (home-page "https://www.gnu.org/software/recutils/")
2256 (synopsis "Emacs mode for working with recutils database files")
2257 (description "This package provides an Emacs major mode @code{rec-mode}
2258for working with GNU Recutils text-based, human-editable databases. It
2259supports editing, navigation, and querying of recutils database files
2260including field and record folding.")
2261 (license license:gpl3+)))
2262
2263(define-public rocksdb
2264 (package
2265 (name "rocksdb")
2266 (version "10.4.2")
2267 (source (origin
2268 (method git-fetch)
2269 (uri (git-reference
2270 (url "https://github.com/facebook/rocksdb")
2271 (commit (string-append "v" version))))
2272 (file-name (git-file-name name version))
2273 (sha256
2274 (base32
2275 "1cgr33qv639fyx067sg8nsy8mnfac9xgmmw2qwi2bcmir777ma4q"))
2276 (modules '((guix build utils)))
2277 (snippet
2278 '(begin
2279 ;; TODO: unbundle gtest.
2280 (delete-file "build_tools/gnu_parallel")
2281 (substitute* "Makefile"
2282 (("build_tools/gnu_parallel") "parallel"))))))
2283 (build-system cmake-build-system)
2284 (arguments
2285 `(#:configure-flags
2286 (list "-DROCKSDB_BUILD_SHARED=1"
2287 ;; Ceph requires that RTTI is enabled.
2288 "-DUSE_RTTI=1"
2289 ;; Prevent the build from passing '-march=native' to the compiler.
2290 "-DPORTABLE=1"
2291 "-DWITH_SNAPPY=1")
2292
2293 ;; Many tests fail on 32-bit platforms. There are multiple
2294 ;; reports about this upstream, but it's not going to be
2295 ;; supported any time soon. What's worse: Release builds don't
2296 ;; include tests, and overriding the build system to build
2297 ;; tests anyway fails with missing TEST_ symbols.
2298 #:tests? #false
2299 #:phases
2300 (modify-phases %standard-phases
2301 (add-after 'unpack 'patch-CMakeLists.txt
2302 (lambda _
2303 (substitute* "CMakeLists.txt"
2304 ;; build reproducibly
2305 (("set\\(BUILD_DATE \"\\$\\{TS\\}\"")
2306 "set(BUILD_DATE \"1970-01-01\""))))
2307 (add-after 'unpack 'build-generically
2308 (lambda _
2309 (substitute* "CMakeLists.txt"
2310 (("if\\(HAVE_SSE42\\)") "if(FALSE)")))))))
2311 (native-inputs
2312 (list parallel perl procps python which))
2313 (inputs
2314 (list bzip2
2315 gflags
2316 jemalloc
2317 lz4
2318 zlib))
2319 ;; RocksDBConfig.cmake references snappy.
2320 (propagated-inputs (list snappy))
2321 (home-page "https://rocksdb.org/")
2322 (synopsis "Persistent key-value store for fast storage")
2323 (description
2324 "RocksDB is a library that forms the core building block for a fast
2325key-value server, especially suited for storing data on flash drives. It
2326has a @dfn{Log-Structured-Merge-Database} (LSM) design with flexible tradeoffs
2327between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor}
2328(RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded
2329compactions, making it specially suitable for storing multiple terabytes of
2330data in a single database. RocksDB is partially based on @code{LevelDB}.")
2331 ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header
2332 ;; files carry the 3-clause BSD license.
2333 (license (list license:gpl2 license:asl2.0 license:bsd-3))))
2334
2335(define-public rocksdb-for-ceph
2336 (let ((commit "9fa4990159853479a222244574ca41202e4c95c1")
2337 (revision "0"))
2338 (package
2339 (inherit rocksdb)
2340 (name "rocksdb-for-ceph")
2341 (version (git-version "7.9.2" revision commit))
2342 (source (origin
2343 (inherit (package-source rocksdb))
2344 (uri (git-reference
2345 (url "https://github.com/ceph/rocksdb")
2346 (commit commit)))
2347 (file-name (git-file-name name version))
2348 (sha256
2349 (base32
2350 "0pdy461m9a48x4i829sirpypdlzf3q79p8iw3dng9wd4r4vyv594"))))
2351 (arguments (substitute-keyword-arguments arguments
2352 ((#:configure-flags flags ''())
2353 #~(cons "-DCMAKE_CXX_FLAGS=-Wno-error=maybe-uninitialized"
2354 #$flags)))))))
2355
2356(define-public sparql-query
2357 (package
2358 (name "sparql-query")
2359 (version "1.1")
2360 (source (origin
2361 (method git-fetch)
2362 (uri (git-reference
2363 (url "https://github.com/tialaramex/sparql-query")
2364 (commit version)))
2365 (sha256
2366 (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk"))
2367 (file-name (git-file-name name version))))
2368 (build-system gnu-build-system)
2369 (inputs
2370 (list curl glib libxml2 ncurses readline))
2371 (native-inputs
2372 (list pkg-config))
2373 (arguments
2374 `(#:make-flags '("CC=gcc")
2375 #:phases
2376 (modify-phases %standard-phases
2377 (delete 'configure)
2378 ;; The Makefile uses git to obtain versioning information. This phase
2379 ;; substitutes the git invocation with the package version.
2380 (add-after 'unpack 'remove-git-dependency
2381 (lambda _
2382 (substitute* "Makefile"
2383 (("^gitrev :=.*$")
2384 (string-append "gitrev = \"v" ,version "\"")))
2385 #t))
2386 ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
2387 ;; This replacement does the same thing, except for using $PREFIX/bin
2388 ;; instead.
2389 (replace 'install
2390 (lambda* (#:key outputs #:allow-other-keys)
2391 (let* ((out (assoc-ref outputs "out"))
2392 (bin (string-append out "/bin")))
2393 (install-file "sparql-query" bin)
2394 (symlink (string-append bin "/sparql-query")
2395 (string-append bin "/sparql-update")))
2396 #t))
2397 (replace 'check
2398 (lambda* (#:key make-flags #:allow-other-keys)
2399 (apply invoke "make" `(,@make-flags "scan-test"))
2400 (invoke "./scan-test"))))))
2401 (home-page "https://github.com/tialaramex/sparql-query/")
2402 (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
2403 (description "Sparql-query is a command-line tool for accessing SPARQL
2404endpoints over HTTP. It has been intentionally designed to @code{feel} similar to
2405tools for interrogating SQL databases. For example, you can enter a query over
2406several lines, using a semi-colon at the end of a line to indicate the end of
2407your query. It also supports readline so that you can more easily recall and
2408edit previous queries, even across sessions. It can be used non-interactively,
2409for example from a shell script.")
2410 ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
2411 ;; others (like sparql-query.c) contain a GPLv2+ license header.
2412 (license (list license:gpl3+))))
2413
2414(define-public sqitch
2415 (package
2416 (name "sqitch")
2417 (version "1.1.0")
2418 (source
2419 (origin
2420 (method url-fetch)
2421 (uri (string-append
2422 "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v"
2423 version ".tar.gz"))
2424 (sha256
2425 (base32 "1ayiwg9kh3w0nbacbcln7h944z94vq5vnnd5diz86033bpbnq57f"))))
2426 (build-system perl-build-system)
2427 (arguments
2428 '(#:phases
2429 (modify-phases %standard-phases
2430 (add-before 'check 'set-check-environment
2431 (lambda _
2432 (setenv "TZ" "UTC")
2433 (setenv "HOME" "/tmp")))
2434 (add-after 'install 'wrap-program
2435 (lambda* (#:key outputs #:allow-other-keys)
2436 (let* ((out (assoc-ref outputs "out"))
2437 (path (getenv "PERL5LIB")))
2438 (wrap-program (string-append out "/bin/sqitch")
2439 `("PERL5LIB" ":" prefix
2440 (,(string-append out "/lib/perl5/site_perl"
2441 ":"
2442 path))))))))))
2443 (native-inputs
2444 (list perl-capture-tiny
2445 perl-io-pager
2446 perl-module-build
2447 perl-module-runtime
2448 perl-path-class
2449 perl-test-deep
2450 perl-test-dir
2451 perl-test-exception
2452 perl-test-file
2453 perl-test-file-contents
2454 perl-test-mockmodule
2455 perl-test-mockobject
2456 perl-test-nowarnings
2457 perl-test-warn))
2458 (inputs
2459 (list bash-minimal
2460 perl-class-xsaccessor
2461 perl-clone
2462 perl-config-gitlike
2463 perl-datetime
2464 perl-datetime-timezone
2465 perl-dbd-mysql
2466 perl-dbd-pg
2467 perl-dbd-sqlite
2468 perl-dbi
2469 perl-devel-stacktrace
2470 perl-encode-locale
2471 perl-hash-merge
2472 perl-ipc-run3
2473 perl-ipc-system-simple
2474 perl-libintl-perl
2475 perl-list-moreutils
2476 perl-moo
2477 perl-mysql-config
2478 perl-namespace-autoclean
2479 perl-path-class
2480 perl-perlio-utf8_strict
2481 perl-string-formatter
2482 perl-string-shellquote
2483 perl-sub-exporter
2484 perl-template-tiny
2485 perl-template-toolkit
2486 perl-throwable
2487 perl-try-tiny
2488 perl-type-tiny
2489 perl-type-tiny-xs
2490 perl-uri
2491 perl-uri-db))
2492 (home-page "https://sqitch.org/")
2493 (synopsis "Database change management tool")
2494 (description
2495 "Sqitch is a standalone change management system for database schemas,
2496which uses SQL to describe changes.")
2497 (license license:x11)))
2498
2499(define-public tdb
2500 (package
2501 (name "tdb")
2502 (version "1.4.12")
2503 (source (origin
2504 (method url-fetch)
2505 (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
2506 version ".tar.gz"))
2507 (sha256
2508 (base32
2509 "0yndhh829ai2p3n4i63h1rhl22dcvzba0rffgqihjbc1k1sb5r3c"))))
2510 (build-system gnu-build-system)
2511 (arguments
2512 '(#:phases
2513 (modify-phases %standard-phases
2514 (replace 'configure
2515 (lambda* (#:key outputs #:allow-other-keys)
2516 (let ((out (assoc-ref outputs "out")))
2517 ;; The 'configure' script is a wrapper for Waf and
2518 ;; doesn't recognize things like '--enable-fast-install'.
2519 (invoke "./configure"
2520 (string-append "--prefix=" out))))))))
2521 (native-inputs
2522 (list docbook-xsl
2523 libxcrypt
2524 libxslt
2525 python ;for the Waf build system
2526 which))
2527 (home-page "https://tdb.samba.org/")
2528 (synopsis "Trivial database")
2529 (description
2530 "TDB is a Trivial Database. In concept, it is very much like GDBM,
2531and BSD's DB except that it allows multiple simultaneous writers and uses
2532locking internally to keep writers from trampling on each other. TDB is also
2533extremely small.")
2534 (license license:lgpl3+)))
2535
2536(define-public perl-dbi
2537 (package
2538 (name "perl-dbi")
2539 (version "1.643")
2540 (source (origin
2541 (method url-fetch)
2542 (uri (string-append
2543 "mirror://cpan/authors/id/T/TI/TIMB/DBI-"
2544 version ".tar.gz"))
2545 (sha256
2546 (base32
2547 "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa"))))
2548 (build-system perl-build-system)
2549 (synopsis "Database independent interface for Perl")
2550 (description "This package provides a database interface for Perl.")
2551 (home-page "https://metacpan.org/release/DBI")
2552 (license license:perl-license)))
2553
2554(define-public perl-dbix-class
2555 (package
2556 (name "perl-dbix-class")
2557 (version "0.082843")
2558 (source
2559 (origin
2560 (method url-fetch)
2561 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
2562 "DBIx-Class-" version ".tar.gz"))
2563 (sha256
2564 (base32 "0lgjw7z4y2inf3yyfph1ljdp4f5zdmy9vh56fj8w9n19rdp0n7il"))))
2565 (build-system perl-build-system)
2566 (native-inputs
2567 (list perl-dbd-sqlite
2568 perl-module-install
2569 perl-package-stash
2570 perl-test-deep
2571 perl-test-exception
2572 perl-test-warn))
2573 (propagated-inputs
2574 (list perl-class-accessor-grouped
2575 perl-class-c3-componentised
2576 perl-class-inspector
2577 perl-config-any
2578 perl-context-preserve
2579 perl-data-dumper-concise
2580 perl-data-page
2581 perl-dbi
2582 perl-devel-globaldestruction
2583 perl-hash-merge
2584 perl-module-find
2585 perl-moo-2
2586 perl-mro-compat
2587 perl-namespace-clean
2588 perl-path-class
2589 perl-scope-guard
2590 perl-sql-abstract-classic
2591 perl-sub-name
2592 perl-try-tiny))
2593 (home-page "https://metacpan.org/release/DBIx-Class")
2594 (synopsis "Extensible and flexible object <-> relational mapper")
2595 (description "An SQL to OO mapper with an object API inspired by
2596Class::DBI (with a compatibility layer as a springboard for porting) and a
2597resultset API that allows abstract encapsulation of database operations. It
2598aims to make representing queries in your code as perl-ish as possible while
2599still providing access to as many of the capabilities of the database as
2600possible, including retrieving related records from multiple tables in a
2601single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
2602\"ORDER BY\" and \"HAVING\" support.")
2603 (properties
2604 ;; This is needed for perl-catalyst-authentication-store-dbix-class
2605 `((updater-extra-propagated-inputs . ("perl-data-page"))))
2606 (license license:perl-license)))
2607
2608(define-public perl-dbix-class-cursor-cached
2609 (package
2610 (name "perl-dbix-class-cursor-cached")
2611 (version "1.001004")
2612 (source
2613 (origin
2614 (method url-fetch)
2615 (uri (string-append "mirror://cpan/authors/id/A/AR/ARCANEZ/"
2616 "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
2617 (sha256
2618 (base32
2619 "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
2620 (build-system perl-build-system)
2621 (native-inputs
2622 (list perl-cache-cache perl-dbd-sqlite perl-module-install))
2623 (propagated-inputs
2624 (list perl-carp-clan perl-dbix-class))
2625 (home-page "https://metacpan.org/release/DBIx-Class-Cursor-Cached")
2626 (synopsis "Cursor with built-in caching support")
2627 (description "DBIx::Class::Cursor::Cached provides a cursor class with
2628built-in caching support.")
2629 (license license:perl-license)))
2630
2631(define-public perl-dbix-class-introspectablem2m
2632 (package
2633 (name "perl-dbix-class-introspectablem2m")
2634 (version "0.001002")
2635 (source
2636 (origin
2637 (method url-fetch)
2638 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
2639 "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
2640 (sha256
2641 (base32
2642 "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
2643 (build-system perl-build-system)
2644 (native-inputs
2645 (list perl-module-install))
2646 (propagated-inputs
2647 (list perl-dbix-class))
2648 (home-page "https://metacpan.org/release/DBIx-Class-IntrospectableM2M")
2649 (synopsis "Introspect many-to-many relationships")
2650 (description "Because the many-to-many relationships are not real
2651relationships, they can not be introspected with DBIx::Class. Many-to-many
2652relationships are actually just a collection of convenience methods installed
2653to bridge two relationships. This DBIx::Class component can be used to store
2654all relevant information about these non-relationships so they can later be
2655introspected and examined.")
2656 (license license:perl-license)))
2657
2658(define-public perl-dbix-class-schema-loader
2659 (package
2660 (name "perl-dbix-class-schema-loader")
2661 (version "0.07049")
2662 (source
2663 (origin
2664 (method url-fetch)
2665 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
2666 "DBIx-Class-Schema-Loader-" version ".tar.gz"))
2667 (sha256
2668 (base32
2669 "0r57fv71ypxafb85cpxph1hdqii7ipjwvc19yb6fpkvq2ggcssg8"))))
2670 (build-system perl-build-system)
2671 (native-inputs
2672 (list perl-config-any
2673 perl-config-general
2674 perl-dbd-sqlite
2675 perl-dbix-class-introspectablem2m
2676 perl-module-install
2677 perl-moose
2678 perl-moosex-markasmethods
2679 perl-moosex-nonmoose
2680 perl-namespace-autoclean
2681 perl-test-deep
2682 perl-test-differences
2683 perl-test-exception
2684 perl-test-pod
2685 perl-test-warn))
2686 (propagated-inputs
2687 (list perl-class-unload
2688 perl-class-inspector
2689 perl-class-accessor-grouped
2690 perl-class-c3-componentised
2691 perl-carp-clan
2692 perl-data-dump
2693 perl-dbix-class
2694 perl-hash-merge
2695 perl-list-moreutils
2696 perl-lingua-en-inflect-phrase
2697 perl-lingua-en-inflect-number
2698 perl-lingua-en-tagger
2699 perl-namespace-clean
2700 perl-mro-compat
2701 perl-scope-guard
2702 perl-string-camelcase
2703 perl-string-toidentifier-en
2704 perl-sub-name
2705 perl-try-tiny))
2706 (arguments `(#:tests? #f)) ;TODO: t/20invocations.t fails
2707 (home-page "https://metacpan.org/release/DBIx-Class-Schema-Loader")
2708 (synopsis "Create a DBIx::Class::Schema based on a database")
2709 (description "DBIx::Class::Schema::Loader automates the definition of a
2710DBIx::Class::Schema by scanning database table definitions and setting up the
2711columns, primary keys, unique constraints and relationships.")
2712 (license license:perl-license)))
2713
2714(define-public perl-dbix-class-deploymenthandler
2715 (package
2716 (name "perl-dbix-class-deploymenthandler")
2717 (version "0.002233")
2718 (source (origin
2719 (method url-fetch)
2720 (uri (string-append
2721 "mirror://cpan/authors/id/M/MM/MMCCLIMON/DBIx-Class-DeploymentHandler-"
2722 version ".tar.gz"))
2723 (sha256
2724 (base32
2725 "1bikp1q3pm1xphfdr8kmsqvzzpk06an3112mhb6gl8vlpg81ch4m"))))
2726 (build-system perl-build-system)
2727 (native-inputs (list perl-aliased
2728 perl-dbd-sqlite
2729 perl-dbix-class-schema-loader
2730 perl-test-fatal
2731 perl-test-most
2732 perl-test-requires))
2733 (propagated-inputs (list perl-carp-clan
2734 perl-context-preserve
2735 perl-dbix-class
2736 perl-log-contextual
2737 perl-module-runtime
2738 perl-moose
2739 perl-moosex-role-parameterized
2740 perl-namespace-autoclean
2741 perl-path-class
2742 perl-sql-splitstatement
2743 perl-sql-translator
2744 perl-sub-exporter-progressive
2745 perl-sub-quote
2746 perl-text-brew
2747 perl-try-tiny
2748 perl-yaml))
2749 (home-page "https://metacpan.org/release/DBIx-Class-DeploymentHandler")
2750 (synopsis "Extensible DBIx::Class deployment")
2751 (description
2752 "@code{DBIx::Class::DeploymentHandler} is a tool for deploying and
2753upgrading databases with @code{DBIx::Class}. It is designed to be much more
2754flexible than @code{DBIx::Class::Schema::Versioned}, hence the use of Moose
2755and lots of roles.")
2756 (license license:perl-license)))
2757
2758(define-public perl-dbix-simple
2759 (package
2760 (name "perl-dbix-simple")
2761 (version "1.37")
2762 (source (origin
2763 (method url-fetch)
2764 (uri (string-append
2765 "mirror://cpan/authors/id/J/JU/JUERD/DBIx-Simple-" version
2766 ".tar.gz"))
2767 (sha256
2768 (base32
2769 "1qyaj01zb6xplzcp7pj0b9609fvd89c9c4an3i00g2g05jm13ls6"))))
2770 (build-system perl-build-system)
2771 (propagated-inputs (list perl-dbi))
2772 (home-page "https://metacpan.org/release/DBIx-Simple")
2773 (synopsis "Object-oriented interface to DBI")
2774 (description
2775 "DBIx::Simple provides a simplified interface to DBI, Perl's powerful
2776database module. This module is aimed at rapid development and easy
2777maintenance. Query preparation and execution are combined in a single method,
2778the result object (which is a wrapper around the statement handle) provides
2779easy row-by-row and slurping methods.")
2780 ;; The POD info says: "Pick your favorite OSI-approved license"
2781 ;; Use unlicense because it has the least restrictions.
2782 (license license:unlicense)))
2783
2784(define-public perl-dbicx-testdatabase
2785 (package
2786 (name "perl-dbicx-testdatabase")
2787 (version "0.05")
2788 (source (origin
2789 (method url-fetch)
2790 (uri (string-append
2791 "mirror://cpan/authors/id/J/JR/JROCKWAY/DBICx-TestDatabase-"
2792 version ".tar.gz"))
2793 (sha256
2794 (base32
2795 "1kqaiygxiarrqkgqbq1s3xilx77msbdsqrdaqf4628811d9w4fwf"))))
2796 (build-system perl-build-system)
2797 (native-inputs (list perl-dbix-class perl-module-install))
2798 (propagated-inputs (list perl-dbd-sqlite
2799 perl-sql-translator))
2800 (home-page "https://metacpan.org/release/DBICx-TestDatabase")
2801 (synopsis "Create a temporary database from a DBIx::Class::Schema")
2802 (description
2803 "This module creates a temporary SQLite database, deploys a DBIC schema,
2804and then connects to it. This lets you easily test DBIC schema. Since you have
2805a fresh database for every test, you don't have to worry about cleaning up
2806after your tests, ordering of tests affecting failure, etc.")
2807 (license license:perl-license)))
2808
2809(define-public perl-dbix-class-dynamicdefault
2810 (package
2811 (name "perl-dbix-class-dynamicdefault")
2812 (version "0.04")
2813 (source (origin
2814 (method url-fetch)
2815 (uri (string-append
2816 "mirror://cpan/authors/id/M/MS/MSTROUT/DBIx-Class-DynamicDefault-"
2817 version ".tar.gz"))
2818 (sha256
2819 (base32
2820 "1yssda00988hn9v96jl95apbzib74vgbcgf69m5mhhj64amm33r2"))))
2821 (build-system perl-build-system)
2822 (native-inputs (list perl-dbicx-testdatabase perl-module-install))
2823 (propagated-inputs (list perl-dbix-class))
2824 (home-page "https://metacpan.org/release/DBIx-Class-DynamicDefault")
2825 (synopsis "Automatically set and update fields")
2826 (description
2827 "Automatically set and update fields with values calculated at runtime.
2828Ipdate or create actions will set the specified columns to the value returned
2829by the callback you specified as a method name or code reference.")
2830 (license license:perl-license)))
2831
2832(define-public perl-dbix-class-timestamp
2833 (package
2834 (name "perl-dbix-class-timestamp")
2835 (version "0.14")
2836 (source (origin
2837 (method url-fetch)
2838 (uri (string-append
2839 "mirror://cpan/authors/id/R/RI/RIBASUSHI/DBIx-Class-TimeStamp-"
2840 version ".tar.gz"))
2841 (sha256
2842 (base32
2843 "1zhr4r5ffihqsh2imap7zmps2y0h71piqqhg2nqhcwkjhvlxb958"))))
2844 (build-system perl-build-system)
2845 (native-inputs (list perl-class-accessor-grouped
2846 perl-datetime-format-mysql
2847 perl-datetime-format-sqlite
2848 perl-dbd-sqlite
2849 perl-module-install
2850 perl-test-pod
2851 perl-time-warp))
2852 (propagated-inputs (list perl-datetime
2853 perl-dbix-class
2854 perl-dbix-class-dynamicdefault))
2855 (home-page "https://metacpan.org/release/DBIx-Class-TimeStamp")
2856 (synopsis
2857 "DBIx::Class extension to update and create date and time based fields")
2858 (description
2859 "This package works in conjunction with @code{InflateColumn::DateTime} to
2860automatically set update and create date and time based fields in a table.")
2861 (license license:perl-license)))
2862
2863(define-public perl-dbd-pg
2864 (package
2865 (name "perl-dbd-pg")
2866 (version "3.15.1")
2867 (source
2868 (origin
2869 (method url-fetch)
2870 (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/"
2871 "DBD-Pg-" version ".tar.gz"))
2872 (sha256
2873 (base32
2874 "0zn17xb6bmixkmv53p576igzw1jd43cwql35r19m56jwahxm9iqk"))))
2875 (build-system perl-build-system)
2876 (native-inputs
2877 (list perl-dbi))
2878 (propagated-inputs
2879 (list perl-dbi postgresql))
2880 (home-page "https://metacpan.org/release/DBD-Pg")
2881 (synopsis "DBI PostgreSQL interface")
2882 (description "This package provides a PostgreSQL driver for the Perl5
2883@dfn{Database Interface} (DBI).")
2884 (license license:perl-license)))
2885
2886(define-public perl-dbd-mysql
2887 (package
2888 (name "perl-dbd-mysql")
2889 (version "4.050")
2890 (source
2891 (origin
2892 (method url-fetch)
2893 (uri (string-append "mirror://cpan/authors/id/D/DV/DVEEDEN/"
2894 "DBD-mysql-" version ".tar.gz"))
2895 (sha256
2896 (base32 "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g"))))
2897 (build-system perl-build-system)
2898 (arguments
2899 (list
2900 ;; Tests require running MySQL server.
2901 #:tests? #f
2902 #:phases
2903 #~(modify-phases %standard-phases
2904 (add-after 'configure 'add-cflags
2905 (lambda _
2906 (substitute* "Makefile"
2907 (("OPTIMIZE = -O2")
2908 (string-append "OPTIMIZE = -O2 "
2909 "-Wno-error=incompatible-pointer-types "
2910 "-Wno-error=implicit-function-declaration")))))
2911 (add-before 'configure 'skip-library-detection
2912 ;; Avoid dependencies on perl-devel-checklib, openssl, and zlib. They
2913 ;; are really only needed for the test suite; their absence does not
2914 ;; affect the build or the end result.
2915 (lambda _
2916 (substitute* "Makefile.PL"
2917 (("use Devel::CheckLib;" match)
2918 (string-append "# " match))
2919 (("assert_lib")
2920 "print")))))))
2921 (propagated-inputs
2922 `(("perl-dbi" ,perl-dbi)
2923 ("mysql" ,mariadb "lib")
2924 ("mysql-dev" ,mariadb "dev")))
2925 (home-page "https://metacpan.org/release/DBD-mysql")
2926 (synopsis "DBI MySQL interface")
2927 (description "This package provides a MySQL driver for the Perl5
2928@dfn{Database Interface} (DBI).")
2929 (license license:perl-license)))
2930
2931(define-public perl-dbd-sqlite
2932 (package
2933 (name "perl-dbd-sqlite")
2934 (version "1.66")
2935 (source (origin
2936 (method url-fetch)
2937 (uri (string-append
2938 "mirror://cpan/authors/id/I/IS/ISHIGAKI/DBD-SQLite-"
2939 version ".tar.gz"))
2940 (sha256
2941 (base32
2942 "1zljln5nh61gj3k22a1fv2vhx5l83waizmarwkh77hk6kzzmvrw9"))))
2943 (build-system perl-build-system)
2944 (inputs (list sqlite))
2945 (propagated-inputs (list perl-dbi))
2946 (synopsis "SQlite interface for Perl")
2947 (description "DBD::SQLite is a Perl DBI driver for SQLite, that includes
2948the entire thing in the distribution. So in order to get a fast transaction
2949capable RDBMS working for your Perl project you simply have to install this
2950module, and nothing else.")
2951 (license license:perl-license)
2952 (home-page "https://metacpan.org/release/DBD-SQLite")))
2953
2954(define-public perl-mysql-config
2955 (package
2956 (name "perl-mysql-config")
2957 (version "1.04")
2958 (source
2959 (origin
2960 (method url-fetch)
2961 (uri (string-append
2962 "mirror://cpan/authors/id/D/DA/DARREN/MySQL-Config-"
2963 version
2964 ".tar.gz"))
2965 (sha256
2966 (base32
2967 "1svn7ccw2gc4cazvc58j84rxhnc9vs01zpird0l8460598j475qr"))))
2968 (build-system perl-build-system)
2969 (home-page "https://metacpan.org/release/MySQL-Config")
2970 (synopsis "Parse and utilize MySQL's /etc/my.cnf and ~/.my.cnf files")
2971 (description
2972 "@code{MySQL::Config} emulates the @code{load_defaults} function from
2973libmysqlclient. It will fill an array with long options, ready to be parsed by
2974@code{Getopt::Long}.")
2975 (license license:perl-license)))
2976
2977(define-public perl-sql-abstract
2978 (package
2979 (name "perl-sql-abstract")
2980 (version "1.87")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
2985 "SQL-Abstract-" version ".tar.gz"))
2986 (sha256
2987 (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9"))))
2988 (build-system perl-build-system)
2989 (native-inputs
2990 (list perl-module-install perl-test-deep perl-test-exception
2991 perl-test-warn))
2992 (propagated-inputs
2993 (list perl-hash-merge perl-moo perl-mro-compat perl-text-balanced))
2994 (home-page "https://metacpan.org/release/SQL-Abstract")
2995 (synopsis "Generate SQL from Perl data structures")
2996 (description "This module was inspired by the excellent DBIx::Abstract.
2997While based on the concepts used by DBIx::Abstract, the concepts used have
2998been modified to make the SQL easier to generate from Perl data structures.
2999The underlying idea is for this module to do what you mean, based on the data
3000structures you provide it, so that you don't have to modify your code every
3001time your data changes.")
3002 (license license:perl-license)))
3003
3004(define-public perl-sql-abstract-classic
3005 (package
3006 (name "perl-sql-abstract-classic")
3007 (version "1.91")
3008 (source
3009 (origin
3010 (method url-fetch)
3011 (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/"
3012 "SQL-Abstract-Classic-" version ".tar.gz"))
3013 (sha256
3014 (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf"))))
3015 (build-system perl-build-system)
3016 (native-inputs
3017 (list perl-test-deep perl-test-exception perl-test-warn))
3018 (propagated-inputs
3019 (list perl-mro-compat perl-sql-abstract))
3020 (home-page "https://metacpan.org/release/SQL-Abstract-Classic")
3021 (synopsis "Generate SQL from Perl data structures")
3022 (description
3023 "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists
3024to preserve the ability of users to opt into the new way of doing things in
3025later versions according to their own schedules.
3026
3027It is an abstract SQL generation module based on the concepts used by
3028@code{DBIx::Abstract}, with several important differences, especially when it
3029comes to @code{WHERE} clauses. These concepts were modified to make the SQL
3030easier to generate from Perl data structures.
3031
3032The underlying idea is for this module to do what you mean, based on the data
3033structures you provide it. You shouldn't have to modify your code every time
3034your data changes, as this module figures it out.")
3035 (license license:perl-license)))
3036
3037(define-public perl-sql-splitstatement
3038 (package
3039 (name "perl-sql-splitstatement")
3040 (version "1.00023")
3041 (source
3042 (origin
3043 (method url-fetch)
3044 (uri (string-append "mirror://cpan/authors/id/V/VE/VEESH/"
3045 "SQL-SplitStatement-" version ".tar.gz"))
3046 (sha256
3047 (base32 "0ppkx46nydzlnsxf9a8pkyb74wggfrdiiwafab143lrarlh88x0s"))))
3048 (build-system perl-build-system)
3049 (native-inputs
3050 (list perl-test-differences perl-test-exception perl-test-script))
3051 (propagated-inputs
3052 (list perl-class-accessor perl-list-moreutils perl-regexp-common
3053 perl-sql-tokenizer))
3054 (home-page "https://metacpan.org/release/SQL-SplitStatement")
3055 (synopsis "Split SQL code into atomic statements")
3056 (description "This module tries to split any SQL code, even including
3057non-standard extensions, into the atomic statements it is composed of.")
3058 (license license:perl-license)))
3059
3060(define-public perl-sql-tokenizer
3061 (package
3062 (name "perl-sql-tokenizer")
3063 (version "0.24")
3064 (source
3065 (origin
3066 (method url-fetch)
3067 (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
3068 "SQL-Tokenizer-" version ".tar.gz"))
3069 (sha256
3070 (base32
3071 "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s"))))
3072 (build-system perl-build-system)
3073 (home-page "https://metacpan.org/release/SQL-Tokenizer")
3074 (synopsis "SQL tokenizer")
3075 (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not
3076claim to be a parser or query verifier. It just creates sane tokens from a
3077valid SQL query.")
3078 (license license:perl-license)))
3079
3080(define-public perl-sql-translator
3081 (package
3082 (name "perl-sql-translator")
3083 (version "1.63")
3084 (source (origin
3085 (method url-fetch)
3086 (uri (string-append
3087 "mirror://cpan/authors/id/V/VE/VEESH/SQL-Translator-"
3088 version ".tar.gz"))
3089 (sha256
3090 (base32
3091 "0cric118ms3dcnb3m2a1jdhdxmai8wwp5jbx34mf72s9jd6b11aq"))))
3092 (build-system perl-build-system)
3093 (native-inputs (list perl-file-sharedir-install
3094 perl-json-maybexs
3095 perl-test-differences
3096 perl-test-exception
3097 perl-test-most
3098 perl-xml-writer
3099 perl-yaml))
3100 (propagated-inputs (list perl-carp-clan
3101 perl-dbi
3102 perl-file-sharedir
3103 perl-gd
3104 perl-graph
3105 perl-graphviz
3106 perl-moo
3107 perl-package-variant
3108 perl-parse-recdescent
3109 perl-spreadsheet-parseexcel
3110 perl-strictures-2
3111 perl-sub-quote
3112 perl-template-toolkit
3113 perl-text-recordparser
3114 perl-try-tiny
3115 perl-xml-libxml))
3116 (home-page "https://metacpan.org/release/SQL-Translator")
3117 (synopsis "Manipulate structured data definitions (SQL and more)")
3118 (description
3119 "@code{SQL::Translator} is a group of Perl modules that converts
3120vendor-specific SQL table definitions into other formats, such as other
3121vendor-specific SQL, ER diagrams, documentation (POD and HTML), XML, and
3122@code{Class::DBI} classes. The main focus is SQL, but parsers exist for other
3123structured data formats, including Excel spreadsheets and arbitrarily
3124delimited text files. Through the separation of the code into parsers and
3125producers with an object model in between, it's possible to combine any parser
3126with any producer, to plug in custom parsers or producers, or to manipulate
3127the parsed data via the built-in object model. Presently only the definition
3128parts of SQL are handled (CREATE, ALTER), not the manipulation of
3129data (INSERT, UPDATE, DELETE).")
3130 (license license:perl-license)))
3131
3132(define-public perl-test-postgresql
3133 (package
3134 (name "perl-test-postgresql")
3135 (version "1.29")
3136 (source (origin
3137 (method url-fetch)
3138 (uri (string-append
3139 "mirror://cpan/authors/id/T/TJ/TJC/Test-PostgreSQL-" version
3140 ".tar.gz"))
3141 (sha256
3142 (base32
3143 "17jgiqdyprb8q4855anica2kr0lxdi9rnq27vsfclk6ai7jzgb0q"))))
3144 (build-system perl-build-system)
3145 (arguments
3146 (list #:tests? #f)) ;2/41 fail, require running Postgres server
3147 (native-inputs (list perl-module-build-tiny
3148 perl-test-sharedfork))
3149 (propagated-inputs (list perl-dbd-pg
3150 perl-dbi
3151 perl-file-which
3152 perl-function-parameters
3153 perl-moo
3154 perl-tie-hash-method
3155 perl-try-tiny
3156 perl-type-tiny))
3157 (home-page "https://metacpan.org/release/Test-PostgreSQL")
3158 (synopsis "PostgreSQL runner for tests")
3159 (description
3160 "@code{Test::PostgreSQL} automatically setups a PostgreSQL instance in a
3161temporary directory, and destroys it when the perl script exits.")
3162 (license license:artistic2.0)))
3163
3164(define-public pg-prove
3165 (package
3166 (name "pg-prove")
3167 (version "3.37")
3168 (source
3169 (origin
3170 (method url-fetch)
3171 (uri (string-append
3172 "mirror://cpan/authors/id/D/DW/DWHEELER/TAP-Parser-SourceHandler-pgTAP-"
3173 version ".tar.gz"))
3174 (sha256
3175 (base32 "0zarga5pvl6wdc3jv3brvzfgids4zzsdddgp65qnh7ia8j0qb4kf"))))
3176 (build-system perl-build-system)
3177 (native-inputs (list perl-module-build))
3178 (home-page "https://pgtap.org/pg_prove.html")
3179 (synopsis "Run and harness pgTAP tests")
3180 (description
3181 "@command{pg_prove} is a command-line application to run one or more
3182pgTAP tests in a PostgreSQL database. The output of the tests is harvested
3183and processed by TAP::Harness in order to summarize the results of the test.")
3184 (license license:perl-license)))
3185
3186(define-public unixodbc
3187 (package
3188 (name "unixodbc")
3189 (version "2.3.14")
3190 (source (origin
3191 (method url-fetch)
3192 (uri
3193 (string-append
3194 "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
3195 version ".tar.gz"))
3196 (sha256
3197 (base32 "0wa7a82h5dsba23155gfhh1sp4dsbaxq6pppp6q31z017vg18a2f"))))
3198 (build-system gnu-build-system)
3199 (synopsis "Data source abstraction library")
3200 (description "Unixodbc is a library providing an API with which to access
3201data sources. Data sources include SQL Servers and any software with an ODBC
3202Driver.")
3203 (license license:lgpl2.1+)
3204 ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
3205 (home-page "https://www.unixodbc.org")))
3206
3207(define-public sqliteodbc
3208 (package
3209 (name "sqliteodbc")
3210 (version "0.99991")
3211 (source (origin
3212 (method url-fetch)
3213 (uri (string-append "http://www.ch-werner.de/sqliteodbc/"
3214 name "-" version ".tar.gz"))
3215 (sha256
3216 (base32
3217 "0p4avhqxnd2l49g3vpzwrmdi8wxyqzy0vswalaagmqfdsfwav52d"))))
3218 (build-system gnu-build-system)
3219 (arguments
3220 (list
3221 #:tests? #f ; no check target
3222 #:configure-flags
3223 #~(list "--disable-static"
3224 (string-append "--with-sqlite3=" #$(this-package-input "sqlite"))
3225 (string-append "--with-odbc=" #$(this-package-input "unixodbc")))
3226 #:phases
3227 #~(modify-phases %standard-phases
3228 (add-before 'install 'create-lib-directory
3229 (lambda _
3230 (mkdir-p (string-append #$output "/lib"))))
3231 (add-after 'install 'remove-extra-sqlite-extensions
3232 (lambda _
3233 ;; Keep this package focused on the ODBC driver itself.
3234 (for-each delete-file
3235 (find-files (string-append #$output "/lib")
3236 "^libsqlite3_mod_.*\\.(la|so)$"))))
3237 (add-after 'install 'install-odbcinst.ini
3238 (lambda _
3239 (let ((dir (string-append #$output "/share/sqliteodbc")))
3240 (mkdir-p dir)
3241 (call-with-output-file (string-append dir "/odbcinst.ini")
3242 (lambda (port)
3243 (display
3244 (string-append
3245 "[SQLite3]\n"
3246 "Description = SQLite3 ODBC Driver\n"
3247 "Driver = " #$output "/lib/libsqlite3odbc.so\n"
3248 "Setup = " #$output "/lib/libsqlite3odbc.so\n"
3249 "Threading = 2\n")
3250 port)))))))))
3251 (native-search-paths
3252 (list (search-path-specification
3253 (variable "ODBCSYSINI")
3254 (files '("share/sqliteodbc"))
3255 (separator #f))))
3256 (inputs (list sqlite unixodbc))
3257 (home-page "http://www.ch-werner.de/sqliteodbc/")
3258 (synopsis "ODBC driver for SQLite")
3259 (description
3260 "SQLiteODBC provides an ODBC driver for SQLite 3 databases. It installs
3261the shared library and a driver registration file so applications using
3262unixODBC can resolve the @code{SQLite3} driver name from a Guix profile.")
3263 (license license:tcl/tk)))
3264
3265(define-public nanodbc
3266 (package
3267 (name "nanodbc")
3268 (version "2.14.0")
3269 (source (origin
3270 (method git-fetch)
3271 (uri
3272 (git-reference
3273 (url "https://github.com/nanodbc/nanodbc")
3274 (commit (string-append "v" version))))
3275 (file-name (git-file-name name version))
3276 (sha256
3277 (base32
3278 "1253bnrmchga3ra99jqkd2p29bc5h2ip79xd8afblz6b1v00wmbm"))))
3279 (build-system cmake-build-system)
3280 (arguments
3281 `(#:configure-flags
3282 ;; The tests require ODBC backends to be installed.
3283 (list "-DNANODBC_DISABLE_TESTS=ON"
3284 "-DBUILD_SHARED_LIBS=ON")
3285 #:tests? #false))
3286 (inputs
3287 (list unixodbc))
3288 (home-page "https://nanodbc.io/")
3289 (synopsis "C++ wrapper for the native C ODBC API")
3290 (description "The goal for nanodbc is to make developers happy by providing
3291a simpler and less verbose API for working with ODBC. Common tasks should be
3292easy, requiring concise and simple code.")
3293 (license license:expat)))
3294
3295(define-public unqlite
3296 (package
3297 (name "unqlite")
3298 (version "1.1.6")
3299 (source (origin
3300 (method url-fetch)
3301 ;; Contains bug fixes against the official release, and has an
3302 ;; autotooled build system.
3303 (uri (string-append "https://github.com/aidin36/tocc/releases/"
3304 "download/v1.0.0/"
3305 "unqlite-unofficial-" version ".tar.gz"))
3306 (sha256
3307 (base32
3308 "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
3309 (build-system gnu-build-system)
3310 (arguments `(#:tests? #f)) ;No check target
3311 (home-page "https://www.unqlite.org")
3312 (synopsis "In-memory key/value and document store")
3313 (description
3314 "UnQLite is an in-process software library which implements a
3315self-contained, serverless, zero-configuration, transactional NoSQL
3316database engine. UnQLite is a document store database similar to
3317Redis, CouchDB, etc., as well as a standard key/value store
3318similar to BerkeleyDB, LevelDB, etc.")
3319 (license license:bsd-2)))
3320
3321;; NOTE: When upgrading redis, make sure that redis is still released
3322;; under a Free Software license.
3323(define-public redis
3324 (package
3325 (name "redis")
3326 (version "7.2.6")
3327 (source (origin
3328 (method url-fetch)
3329 (uri (string-append "https://download.redis.io/releases/redis-"
3330 version".tar.gz"))
3331 (sha256
3332 (base32
3333 "03ixkzdc43lr4q3my0yax1f1gqz6sr6hch5qdipmbd725xxdc47v"))
3334 (modules '((guix build utils)))
3335 (snippet
3336 ;; Delete bundled jemalloc, as the package will use the libc one
3337 '(begin (delete-file-recursively "deps/jemalloc")))))
3338 (build-system gnu-build-system)
3339 (arguments
3340 (list
3341 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
3342 "MALLOC=libc"
3343 "LDFLAGS=-ldl"
3344 (string-append "PREFIX=" #$output))
3345 #:phases
3346 #~(modify-phases %standard-phases
3347 (delete 'configure)
3348 (add-after 'unpack 'patch-paths
3349 (lambda _
3350 (substitute* "runtest"
3351 (("^TCLSH=.*")
3352 (string-append "TCLSH=" (which "tclsh"))))
3353 (substitute* "tests/support/server.tcl"
3354 (("/usr/bin/env")
3355 (which "env")))))
3356 (add-after 'unpack 'adjust-tests
3357 (lambda _
3358 ;; Disable failing tests.
3359 (substitute* "tests/test_helper.tcl"
3360 ;; The AOF tests cause the test suite to hang waiting for a
3361 ;; "background AOF rewrite to finish", perhaps because dead
3362 ;; processes persist as zombies in the build environment.
3363 (("unit/aofrw") "")
3364 (("integration/aof([^-]|-multi-part)") "")
3365 ;; The OOM score tests try to raise the current OOM score, but
3366 ;; our build environment already sets it for all children to
3367 ;; the highest possible one (1000). We can't lower it because
3368 ;; we don't have CAP_SYS_RESOURCE.
3369 (("unit/oom-score-adj") "")
3370 (("integration/failover") "")
3371 (("integration/replication[^-]") "")))))))
3372 (native-inputs (list pkg-config procps tcl which))
3373 (synopsis "Key-value cache and store")
3374 (description "Redis is an advanced key-value cache and store. Redis
3375supports many data structures including strings, hashes, lists, sets, sorted
3376sets, bitmaps and hyperloglogs.")
3377 (home-page "https://redis.io/")
3378 ;; These two CVEs have long been fixed.
3379 (properties `((lint-hidden-cve . ("CVE-2022-3647" "CVE-2022-33105"))))
3380 (license license:bsd-3)))
3381
3382(define-public valkey-7
3383 (package
3384 (name "valkey")
3385 ;; For compatibility, keep in sync with redis version.
3386 (version "7.2.11")
3387 (source
3388 (origin
3389 (method git-fetch)
3390 (uri (git-reference
3391 (url "https://github.com/valkey-io/valkey")
3392 (commit version)))
3393 (file-name (git-file-name name version))
3394 (sha256
3395 (base32 "099523fqbya1xc87spwdxi5nld48r1di31q6zpn252nny0xbrdcb"))
3396 (modules '((guix build utils)))
3397 (snippet
3398 ;; Delete bundled jemalloc, as the package will use the libc one
3399 #~(begin (delete-file-recursively "deps/jemalloc")))))
3400 (build-system gnu-build-system)
3401 (arguments
3402 (list #:make-flags
3403 #~(list (string-append "CC=" #$(cc-for-target))
3404 "MALLOC=libc"
3405 (string-append "PREFIX=" #$output))
3406 #:phases
3407 #~(modify-phases %standard-phases
3408 (delete 'configure)
3409 (add-after 'unpack 'patch-paths
3410 (lambda _
3411 (substitute* "runtest"
3412 (("^TCLSH=.*")
3413 (string-append "TCLSH=" (which "tclsh"))))
3414 (substitute* "tests/support/server.tcl"
3415 (("/usr/bin/env")
3416 (which "env")))))
3417 (add-after 'unpack 'adjust-tests
3418 (lambda _
3419 ;; Disable failing tests.
3420 (substitute* "tests/test_helper.tcl"
3421 ;; The AOF tests cause the test suite to hang waiting for a
3422 ;; "background AOF rewrite to finish", perhaps because dead
3423 ;; processes persist as zombies in the build environment.
3424 (("unit/aofrw") "")
3425 (("integration/aof([^-]|-multi-part)") "")
3426 ;; The OOM score tests try to raise the current OOM score,
3427 ;; but our build environment already sets it for all
3428 ;; children to the highest possible one (1000). We can't
3429 ;; lower it because we don't have CAP_SYS_RESOURCE.
3430 (("unit/oom-score-adj") "")
3431
3432 (("integration/failover") "")
3433 (("integration/replication[^-]") "")))))))
3434 (native-inputs (list pkg-config procps tcl which))
3435 (home-page "https://valkey.io/")
3436 (synopsis "High-performance key-value datastore")
3437 (description
3438 "Valkey is a high-performance key-value datastore that supports a variety
3439of workloads such as caching, message queues, and can act as a primary
3440database.")
3441 (license license:bsd-3)))
3442
3443(define-public valkey-8
3444 (package
3445 (inherit valkey-7)
3446 (name "valkey")
3447 (version "8.1.4")
3448 (source
3449 (origin
3450 (inherit (package-source valkey-7))
3451 (method git-fetch)
3452 (uri (git-reference
3453 (url "https://github.com/valkey-io/valkey")
3454 (commit version)))
3455 (file-name (git-file-name name version))
3456 (sha256
3457 (base32 "1p7jr5048syd9ln0bsh2n5ba6fd7x9wfa1x67b7wychv7a46dfx1"))))
3458 (arguments
3459 (substitute-keyword-arguments arguments
3460 ((#:phases phases '%standard-phases)
3461 #~(modify-phases #$phases
3462 (replace 'adjust-tests
3463 (lambda _
3464 ;; Disable failing tests.
3465 ;; Valkey search test directories for tests.
3466 (with-directory-excursion "tests"
3467 ;; The AOF tests cause the test suite to hang waiting for a
3468 ;; "background AOF rewrite to finish", perhaps because dead
3469 ;; processes persist as zombies in the build environment.
3470 (delete-file "unit/aofrw.tcl")
3471 (delete-file "integration/aof-multi-part.tcl")
3472
3473 ;; The OOM score tests try to raise the current OOM score, but
3474 ;; our build environment already sets it for all children to
3475 ;; the highest possible one (1000). We can't lower it because
3476 ;; we don't have CAP_SYS_RESOURCE.
3477 (delete-file "unit/oom-score-adj.tcl")
3478
3479 (for-each delete-file
3480 (find-files "integration"
3481 (string-join
3482 '("^failover\\.tcl$"
3483 "^replication"
3484 "replication\\.tcl$")
3485 "|"))))))))))))
3486
3487(define-public hiredis
3488 (package
3489 (name "hiredis")
3490 (version "1.1.0")
3491 (source
3492 (origin
3493 (method git-fetch)
3494 (uri (git-reference
3495 (url "https://github.com/redis/hiredis")
3496 (commit (string-append "v" version))))
3497 (file-name (git-file-name name version))
3498 (sha256
3499 (base32 "1zld30j3kpzqr9w3vkpd6mm3f1b1yk3dlgp9lp6gpsybjjfr2i6h"))))
3500 (build-system cmake-build-system)
3501 (native-inputs
3502 ;; needed for testing
3503 (list redis))
3504 (synopsis "Minimalistic C client library for the Redis database")
3505 (description "This package provides a library for sending commands and
3506receiving replies to and from a Redis server. It comes with a synchronous
3507API, asynchronous API and reply parsing API. Only the binary-safe Redis
3508protocol is supported.")
3509 (home-page "https://github.com/redis/hiredis")
3510 (license license:bsd-3)))
3511
3512(define-public ruby-hiredis
3513 (package
3514 (name "ruby-hiredis")
3515 (version "0.6.3")
3516 (source (origin
3517 (method git-fetch)
3518 (uri (git-reference
3519 (url "https://github.com/redis/hiredis-rb")
3520 (commit (string-append "v" version))))
3521 (file-name (git-file-name name version))
3522 (sha256
3523 (base32
3524 "05y4g7frhym59m9x208zpvg2qvqvfjlgqmygxj8sqgl07n0ww1ks"))
3525 (patches (search-patches
3526 "ruby-hiredis-use-system-hiredis.patch"))))
3527 (build-system ruby-build-system)
3528 (arguments
3529 (list
3530 #:tests? #f ;require native extension
3531 #:phases
3532 #~(modify-phases %standard-phases
3533 (add-after 'unpack 'patch-hiredis-include-directory
3534 (lambda* (#:key inputs #:allow-other-keys)
3535 (substitute* "ext/hiredis_ext/extconf.rb"
3536 ;; Adjust the hiredis include directory.
3537 (("\\$CFLAGS << \" -I/usr/include/hiredis\"")
3538 (format #f "$CFLAGS << \" -I~a\""
3539 (search-input-directory inputs "include/hiredis"))))))
3540 (add-after 'unpack 'disable-building-c-extension
3541 (lambda _
3542 ;; FIXME: The produced native extension appears to segfault when
3543 ;; run; disable building it until a solution is found (see:
3544 ;; https://github.com/redis/hiredis-rb/issues/93).
3545 (substitute* "ext/hiredis_ext/extconf.rb"
3546 (("build_hiredis = true")
3547 "build_hiredis = false"))))
3548 ;; FIXME: Un-comment phase after the extension can be made to run
3549 ;; without crashing (see above).
3550 ;; (add-after 'build 'build-ext
3551 ;; (lambda _
3552 ;; (setenv "CC" #$(cc-for-target))
3553 ;; (invoke "rake" "compile")))
3554 (add-before 'check 'start-redis
3555 (lambda _
3556 (invoke "redis-server" "--daemonize" "yes")))
3557 (add-after 'install 'delete-mkmf.log
3558 (lambda _
3559 ;; This build log captures non-deterministic file names (see:
3560 ;; https://github.com/rubygems/rubygems/issues/6259).
3561 (for-each delete-file (find-files #$output "^mkmf\\.log$")))))))
3562 (native-inputs (list redis ruby-rake-compiler))
3563 (inputs (list hiredis))
3564 (synopsis "Ruby wrapper for hiredis")
3565 (description "@code{hiredis-rb} is a Ruby extension that wraps
3566@code{hiredis}, a minimalist C client for Redis. Both the synchronous
3567connection API and a separate protocol reader are supported. It is primarily
3568intended to speed up parsing multi bulk replies.")
3569 (home-page "https://github.com/redis/hiredis-rb")
3570 (license license:bsd-3)))
3571
3572(define-public ruby-redis
3573 (package
3574 (name "ruby-redis")
3575 (version "4.2.5")
3576 (source
3577 (origin
3578 (method url-fetch)
3579 (uri (rubygems-uri "redis" version))
3580 (sha256
3581 (base32
3582 "15x2sr6h094rjbvg8pkq6m3lcd5abpyx93aifvfdz3wv6x55xa48"))))
3583 (build-system ruby-build-system)
3584 (arguments
3585 `(#:tests? #f)) ; Tests require a running redis server.
3586 (synopsis "Ruby client for Redis' API")
3587 (description
3588 "This package provides a Ruby client that tries to match Redis' API
3589one-to-one, while still providing an idiomatic interface.")
3590 (home-page "https://github.com/redis/redis-rb")
3591 (license license:expat)))
3592
3593(define-public go-github-com-cupcake-rdb
3594 (package
3595 (name "go-github-com-cupcake-rdb")
3596 (version "0.0.0-20161107195141-43ba34106c76")
3597 (source
3598 (origin
3599 (method git-fetch)
3600 (uri (git-reference
3601 (url "https://github.com/tent/rdb")
3602 (commit (go-version->git-ref version))))
3603 (file-name (git-file-name name version))
3604 (sha256
3605 (base32 "1l4bsn5yj8r875crz1rsk6dlvhv0bd8mgazsch5vl4c19v0fs2ib"))))
3606 (build-system go-build-system)
3607 (arguments '(#:import-path "github.com/cupcake/rdb"))
3608 (native-inputs
3609 (list go-gopkg-in-check-v1))
3610 (home-page "https://github.com/tent/rdb")
3611 (synopsis "Redis RDB parser for Go")
3612 (description
3613 "Package rdb implements parsing and encoding of the Redis RDB file format.")
3614 (license license:expat)))
3615
3616(define-public kyotocabinet
3617 (package
3618 (name "kyotocabinet")
3619 (version "1.2.79")
3620 (source (origin
3621 (method url-fetch)
3622 (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
3623 "kyotocabinet-" version ".tar.gz"))
3624 (sha256
3625 (base32
3626 "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7"))))
3627 (build-system gnu-build-system)
3628 (arguments
3629 `(#:configure-flags
3630 (list
3631 "--disable-opt" ;"-march=native". XXX this also turns off -O0.
3632 (string-append "LDFLAGS=-Wl,-rpath="
3633 (assoc-ref %outputs "out") "/lib"))))
3634 (inputs (list zlib))
3635 (home-page "https://fallabs.com/kyotocabinet/")
3636 (synopsis
3637 "Kyoto Cabinet is a modern implementation of the DBM database")
3638 (description
3639 "Kyoto Cabinet is a standalone file-based database that supports Hash
3640and B+ Tree data storage models. It is a fast key-value lightweight
3641database and supports many programming languages. It is a NoSQL database.")
3642 (license license:gpl3+)))
3643
3644(define-public tokyocabinet
3645 (package
3646 (name "tokyocabinet")
3647 (version "1.4.48")
3648 (source
3649 (origin
3650 (method url-fetch)
3651 (uri (string-append "http://fallabs.com/tokyocabinet/"
3652 name "-" version ".tar.gz"))
3653 (sha256
3654 (base32
3655 "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0"))))
3656 (build-system gnu-build-system)
3657 (arguments
3658 `(#:configure-flags
3659 (list "--enable-pthread" "--enable-off64"
3660 ,@(if (target-x86?)
3661 ;; Enables x86 specific cflags.
3662 '("--enable-fastest")
3663 '())
3664 (string-append "LDFLAGS=-Wl,-rpath="
3665 (assoc-ref %outputs "out") "/lib"))))
3666 (inputs
3667 (list zlib))
3668 (home-page "http://fallabs.com/tokyocabinet/")
3669 (synopsis "Tokyo Cabinet is a modern implementation of the DBM database")
3670 (description
3671 "Tokyo Cabinet is a library of routines for managing a database.
3672The database is a simple data file containing records, each is a pair of a
3673key and a value. Every key and value is serial bytes with variable length.
3674Both binary data and character string can be used as a key and a value.
3675There is neither concept of data tables nor data types. Records are
3676organized in hash table, B+ tree, or fixed-length array.")
3677 (license license:lgpl2.1+)))
3678
3679(define-public wiredtiger
3680 (package
3681 (name "wiredtiger")
3682 (version "2.9.1")
3683 (source (origin
3684 (method url-fetch)
3685 (uri (string-append
3686 "http://source.wiredtiger.com/releases/wiredtiger-"
3687 version ".tar.bz2"))
3688 (sha256
3689 (base32
3690 "0krwnb2zfbhvjaskwl875qzd3y626s84zcciq2mxr5c5riw3yh6s"))))
3691 (build-system gnu-build-system)
3692 (arguments
3693 '(#:configure-flags '("--enable-lz4" "--with-builtins=snappy,zlib")
3694 #:phases
3695 (modify-phases %standard-phases
3696 (add-before 'check 'disable-test/fops
3697 (lambda _
3698 ;; XXX: timed out after 3600 seconds of silence
3699 (substitute* "Makefile"
3700 (("test/fops") ""))
3701 #t)))))
3702 (inputs
3703 (list lz4 zlib snappy))
3704 (home-page "https://source.wiredtiger.com/")
3705 (synopsis "NoSQL data engine")
3706 (description
3707 "WiredTiger is an extensible platform for data management. It supports
3708row-oriented storage (where all columns of a row are stored together),
3709column-oriented storage (where columns are stored in groups, allowing for
3710more efficient access and storage of column subsets) and log-structured merge
3711trees (LSM), for sustained throughput under random insert workloads.")
3712 (license license:gpl3) ; or GPL-2
3713 ;; configure.ac: WiredTiger requires a 64-bit build.
3714 (supported-systems (delete "riscv64-linux" %64bit-supported-systems))))
3715
3716(define-public wiredtiger-3
3717 (package
3718 (inherit wiredtiger)
3719 (name "wiredtiger")
3720 (version "3.1.0")
3721 (source (origin
3722 (method url-fetch)
3723 (uri (string-append "http://source.wiredtiger.com/releases/wiredtiger-"
3724 version ".tar.bz2"))
3725 (sha256
3726 (base32
3727 "014awypv579ascg4jbx4pndj2wld337m79yyzrzyr7hxrff139jx"))))))
3728
3729(define-public guile-wiredtiger
3730 (package
3731 (name "guile-wiredtiger")
3732 (version "0.7.0")
3733 (source (origin
3734 (method git-fetch)
3735 (uri (git-reference
3736 (url "https://framagit.org/a-guile-mind/guile-wiredtiger.git")
3737 (commit "340ad4bc2ff4dcc6216a2f5c6f9172ca320ac66b")))
3738 (file-name (string-append name "-" version "-checkout"))
3739 (sha256
3740 (base32
3741 "15j36bvxxzil7qpwlmh1rffqpva3ynvrcpqhhqbj2c9208ayz595"))))
3742 (build-system gnu-build-system)
3743 (arguments
3744 '(#:parallel-tests? #f ;; tests can't be run in parallel, yet.
3745 #:configure-flags
3746 (list (string-append "--with-libwiredtiger-prefix="
3747 (assoc-ref %build-inputs "wiredtiger")))
3748 #:make-flags '("GUILE_AUTO_COMPILE=0")))
3749 (native-inputs
3750 (list autoconf automake pkg-config))
3751 (inputs
3752 (list wiredtiger-3 guile-2.2))
3753 (propagated-inputs
3754 (list guile2.2-bytestructures))
3755 (synopsis "WiredTiger bindings for GNU Guile")
3756 (description
3757 "This package provides Guile bindings to the WiredTiger ``NoSQL''
3758database.")
3759 (home-page "https://framagit.org/a-guile-mind/guile-wiredtiger")
3760 (license license:gpl3+)))
3761
3762(define-public perl-db-file
3763 (package
3764 (name "perl-db-file")
3765 (version "1.858")
3766 (source
3767 (origin
3768 (method url-fetch)
3769 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-"
3770 version ".tar.gz"))
3771 (sha256
3772 (base32 "1xm7s2ag15498kp7g8r20gxk22ncz3b3hz4b3srqf7ypif3a5dyf"))))
3773 (build-system perl-build-system)
3774 (arguments
3775 (list
3776 #:phases
3777 #~(modify-phases %standard-phases
3778 (add-before 'configure 'modify-config.in
3779 (lambda _
3780 (substitute* "config.in"
3781 (("/usr/local/BerkeleyDB")
3782 #$(this-package-input "bdb"))))))))
3783 (inputs (list bdb))
3784 (native-inputs (list perl-test-pod))
3785 (home-page "https://metacpan.org/release/DB_File")
3786 (synopsis "Perl5 access to Berkeley DB version 1.x")
3787 (description
3788 "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
3789 (license license:perl-license)))
3790
3791(define-public lmdb
3792 (package
3793 (name "lmdb")
3794 (version "0.9.29")
3795 (source
3796 (origin
3797 (method git-fetch)
3798 (uri (git-reference
3799 (url "https://git.openldap.org/openldap/openldap.git")
3800 (commit (string-append "LMDB_" version))))
3801 (file-name (git-file-name name version))
3802 (sha256
3803 (base32 "0airps4cd0d91nbgy7hgvifa801snxwxzwxyr6pdv61plsi7h8l3"))))
3804 (build-system gnu-build-system)
3805 (arguments
3806 `(#:test-target "test"
3807 ;; TODO: Make this unconditional on core-updates.
3808 ,@(if (%current-target-system)
3809 `(#:make-flags `(,(string-append "CC=" ,(cc-for-target))
3810 ,(string-append "AR=" ,(ar-for-target))))
3811 '())
3812 #:phases
3813 (modify-phases %standard-phases
3814 (replace 'configure
3815 (lambda* (#:key outputs #:allow-other-keys)
3816 (chdir "libraries/liblmdb")
3817 (substitute* "Makefile"
3818 (("/usr/local") (assoc-ref outputs "out")))
3819 #t))
3820 (add-after 'install 'create-pkg-config-file
3821 (lambda* (#:key outputs #:allow-other-keys)
3822 (let ((out (assoc-ref outputs "out")))
3823 (mkdir-p (string-append out "/lib/pkgconfig"))
3824 (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
3825 (lambda _
3826 (format #t "prefix=~a~@
3827 exec_prefix=~a~@
3828 libdir=~a/lib~@
3829 includedir=~a/include~@
3830 ~@
3831 Name: liblmdb~@
3832 Version: ~a~@
3833 Description: Lightning Memory-Mapped Database library~@
3834 Libs: -L${libdir} -llmdb~@
3835 Cflags: -I${includedir}~%"
3836 out out out out ,version)))
3837 #t))))))
3838 (home-page "https://symas.com/lmdb/")
3839 (synopsis "Lightning Memory-Mapped Database library")
3840 (description
3841 "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
3842transactional database. Unlike more complex relational databases, LMDB handles
3843only key-value pairs (stored as arbitrary byte arrays) and relies on the
3844underlying operating system for caching and locking, keeping the code small and
3845simple.
3846The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
3847disk-based databases with high read performance that scales linearly over
3848multiple cores. The size of each database is limited only by the size of the
3849virtual address space — not physical RAM.")
3850 (license license:openldap2.8)))
3851
3852(define-public lmdbxx
3853 (package
3854 (name "lmdbxx")
3855 (version "1.0.0")
3856 (source
3857 (origin
3858 (method git-fetch)
3859 (uri (git-reference
3860 (url "https://github.com/hoytech/lmdbxx")
3861 (commit version)))
3862 (file-name (git-file-name name version))
3863 (sha256
3864 (base32 "12k5rz74d1l0skcks9apry1svkl96g9lf5dcgylgjmh7v1jm0b7c"))))
3865 (arguments
3866 `(#:make-flags
3867 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3868 #:phases
3869 (modify-phases %standard-phases
3870 (delete 'configure))))
3871 (build-system gnu-build-system)
3872 (inputs (list lmdb))
3873 (home-page "https://github.com/hoytech/lmdbxx")
3874 (synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
3875 (description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
3876@code{LMDB} embedded database library, offering both an error-checked
3877procedural interface and an object-oriented resource interface with RAII
3878semantics.")
3879 (license license:unlicense)))
3880
3881(define-public libpqxx
3882 (package
3883 (name "libpqxx")
3884 (version "7.10.1")
3885 (source (origin
3886 (method git-fetch)
3887 (uri (git-reference
3888 (url "https://github.com/jtv/libpqxx")
3889 (commit version)))
3890 (file-name (git-file-name name version))
3891 (sha256
3892 (base32
3893 "0x81igwfk7nwc8vvggsnlz806kfzvc7bz0yrqadki01rj348hn85"))))
3894 (build-system gnu-build-system)
3895 (native-inputs (list python-wrapper))
3896 (inputs (list postgresql))
3897 (arguments '(#:tests? #f)) ;tests require a running PostgreSQL server
3898 (synopsis "C++ connector for PostgreSQL")
3899 (description
3900 "Libpqxx is a C++ library to enable user programs to communicate with the
3901PostgreSQL database back-end. The database back-end can be local or it may be
3902on another machine, accessed via TCP/IP.")
3903 (home-page "https://pqxx.org/")
3904 (license license:bsd-3)))
3905
3906(define-public python-peewee
3907 (package
3908 (name "python-peewee")
3909 (version "3.18.2")
3910 (source
3911 (origin
3912 (method git-fetch)
3913 (uri (git-reference
3914 (url "https://github.com/coleifer/peewee")
3915 (commit version)))
3916 (file-name (git-file-name name version))
3917 (sha256
3918 (base32 "1qd57cd33mf48q0xfmnld58xn5jpbgqrj1bnqlkjmk87y3g9i0q4"))))
3919 (build-system pyproject-build-system)
3920 (arguments
3921 (list
3922 #:test-backend #~'custom
3923 #:test-flags #~(list "runtests.py")))
3924 (inputs
3925 (list sqlite))
3926 (native-inputs
3927 (list python-setuptools))
3928 (home-page "https://github.com/coleifer/peewee/")
3929 (synopsis "Small object-relational mapping utility")
3930 (description
3931 "Peewee is a simple and small ORM (object-relation mapping) tool. Peewee
3932handles converting between pythonic values and those used by databases, so you
3933can use Python types in your code without having to worry. It has built-in
3934support for sqlite, mysql and postgresql. If you already have a database, you
3935can autogenerate peewee models using @code{pwiz}, a model generator.")
3936 (license license:expat)))
3937
3938(define-public python-pypika-tortoise
3939 (package
3940 (name "python-pypika-tortoise")
3941 (version "0.6.3")
3942 (source
3943 (origin
3944 (method git-fetch)
3945 (uri (git-reference
3946 (url "https://github.com/tortoise/pypika-tortoise")
3947 (commit (string-append "v" version))))
3948 (file-name (git-file-name name version))
3949 (sha256
3950 (base32 "0czxc4im7iik9igqzwvxfjbyn66avmr8a1bcvcsxpzd22ywiycis"))))
3951 (build-system pyproject-build-system)
3952 (arguments
3953 (list
3954 ;; tests: 904 passed, 1 deselected
3955 #:test-flags
3956 ;; FileNotFoundError: [Errno 2] No such file or directory: 'uvx'
3957 #~(list "--deselect=tests/test_poetry_add.py::test_added_by_poetry_v2")))
3958 (native-inputs
3959 (list python-pdm-backend
3960 python-pytest))
3961 (home-page "https://github.com/tortoise/pypika-tortoise")
3962 (synopsis "Pypika fork for tortoise-orm")
3963 (description "Pypika-tortoise is a fork of pypika which has been
3964streamlined for its use in the context of tortoise-orm. It removes support
3965for many database kinds that tortoise-orm doesn't need, for example.")
3966 (license license:asl2.0)))
3967
3968(define-public python-asyncpg
3969 (package
3970 (name "python-asyncpg")
3971 ;; asyncpg 0.31.0 requires Cython(>=3.2.1,<4.0.0), got Cython==3.1.2
3972 (version "0.30.0")
3973 (source
3974 (origin
3975 ;; git-fetch leads to errors like
3976 ;; ValueError: 'asyncpg/pgproto/pgproto.pyx' doesn't match any files
3977 (method url-fetch)
3978 (uri (pypi-uri "asyncpg" version))
3979 (sha256
3980 (base32 "0lf8xbrsb2ycpqx1vzlb05p48g5sh9zq24a8yh17cw5nia9fjlf5"))))
3981 (build-system pyproject-build-system)
3982 (arguments
3983 (list
3984 #:test-flags
3985 ;; raises ValueError("Invalid IPv6 URL") ; Maybe due to urllib?
3986 #~(list "-k" "not TestConnectParams")))
3987 (native-inputs
3988 (list postgresql
3989 python-cython
3990 python-pytest
3991 python-uvloop
3992 python-distro
3993 python-setuptools))
3994 (home-page "https://github.com/MagicStack/asyncpg")
3995 (synopsis "Fast PostgreSQL database client library for Python")
3996 (description "@code{asyncpg} is a database interface library designed
3997specifically for PostgreSQL and Python/asyncio. @code{asyncpg} is an
3998efficient, clean implementation of PostgreSQL server binary protocol for use
3999with Python's asyncio framework.")
4000 (license license:asl2.0)))
4001
4002(define-public python-asyncmy
4003 (package
4004 (name "python-asyncmy")
4005 (version "0.2.10")
4006 (source
4007 (origin
4008 (method git-fetch)
4009 (uri (git-reference
4010 (url "https://github.com/long2ice/asyncmy")
4011 (commit (string-append "v" version))))
4012 (file-name (git-file-name name version))
4013 (sha256
4014 (base32 "10sqihiwx7vsdaavgl418hhk7d5rl6d1i60y5bjr76mdfny18q55"))))
4015 (build-system pyproject-build-system)
4016 (arguments
4017 (list
4018 ;; XXX: Most tests fail, probably because
4019 ;; of pytest-asyncio version mismatch.
4020 #:tests? #f
4021 #:phases
4022 #~(modify-phases %standard-phases
4023 (add-after 'install 'cleanup
4024 (lambda* (#:key inputs outputs #:allow-other-keys)
4025 (for-each delete-file
4026 (find-files (site-packages inputs outputs)
4027 "\\.(c|pyx)$"))))
4028
4029 (replace 'check
4030 (lambda* (#:key tests? #:allow-other-keys #:rest rest)
4031 (when tests?
4032 ;; XXX: Else pytest picks up the wrong __init__.py
4033 (delete-file-recursively "asyncmy")
4034 ;; The tests rely on a MySQL or MariaDB test server
4035 ;; being available.
4036 (let ((datadir "/tmp/mysql")
4037 (socket "/tmp/mysql/mysqld.sock")
4038 (username "root")
4039 (password "123456")) ;default in conftest.py
4040 (invoke "mysqld" "--initialize-insecure"
4041 (string-append "--datadir=" datadir))
4042 (spawn "mysqld"
4043 (list
4044 "mysqld"
4045 ;; Respect '--datadir'.
4046 "--no-defaults"
4047 (string-append "--datadir=" datadir)
4048 (string-append "--socket=" socket)))
4049 (sleep 1)
4050 (invoke "mysql"
4051 (string-append "--socket=" socket)
4052 "-u" "root"
4053 "-e" (string-append
4054 "ALTER USER 'root'@'localhost' IDENTIFIED BY '"
4055 password "';"))
4056 (apply (assoc-ref %standard-phases 'check)
4057 `(#:tests? ,tests? ,@rest)))))))))
4058 (native-inputs
4059 (list mysql
4060 python-cython
4061 python-poetry-core
4062 python-pytest
4063 python-pytest-asyncio
4064 python-setuptools))
4065 (home-page "https://github.com/long2ice/asyncmy")
4066 (synopsis "Fast MySQL driver for Python")
4067 (description "@code{asyncmy} is a fast @code{asyncio} MySQL driver, which
4068reuses most of @code{pymysql} and @code{aiomysql} but rewrites the core
4069protocol with Cython for performance.")
4070 (license license:asl2.0)))
4071
4072(define-public python-asyncodbc
4073 (package
4074 (name "python-asyncodbc")
4075 (version "0.1.1")
4076 (source
4077 (origin
4078 (method git-fetch)
4079 (uri (git-reference
4080 (url "https://github.com/tortoise/asyncodbc")
4081 (commit (string-append "v" version))))
4082 (file-name (git-file-name name version))
4083 (sha256
4084 (base32 "0fdcvx2r09vsxx3zw8zvj7ww6wyby8sk3r2a3174nfngiajbi6g1"))))
4085 (build-system pyproject-build-system)
4086 (arguments
4087 (list #:tests? #f)) ;tests fail similarly to python-pyodbc
4088 (native-inputs
4089 (list python-poetry-core
4090 unixodbc))
4091 (propagated-inputs
4092 (list python-pyodbc))
4093 (home-page "https://github.com/tortoise/asyncodbc")
4094 (synopsis "Access ODBC databases with asyncio")
4095 (description "This package provides an improved fork of
4096@code{python-aioodbc}, and makes it possible to Access ODBC databases with
4097@code{python-asyncio}.")
4098 (license license:asl2.0)))
4099
4100(define-public python-aiomysql
4101 (package
4102 (name "python-aiomysql")
4103 (version "0.1.1")
4104 (source
4105 (origin
4106 (method url-fetch)
4107 (uri (pypi-uri "aiomysql" version))
4108 (sha256
4109 (base32 "0zhhisf2bz2hv0vcklw45k54yr0f7gx61gnq4lc7vdp6v97nqs0d"))))
4110 (build-system pyproject-build-system)
4111 (arguments '(#:tests? #f)) ;test suite requires docker
4112 (propagated-inputs (list python-pymysql))
4113 (native-inputs (list python-setuptools python-wheel))
4114 (home-page "https://github.com/aio-libs/aiomysql")
4115 (synopsis "MySQL driver for Python")
4116 (description "@code{aiomysql} is a driver for accessing a MySQL database
4117from the @code{asyncio} Python framework. It depends on and reuses most parts
4118of PyMySQL. @code{aiomysql} tries to preserve the same API as the
4119@code{aiopg} library.")
4120 (license license:expat)))
4121
4122(define-public python-tortoise-orm
4123 (package
4124 (name "python-tortoise-orm")
4125 (version "0.25.3")
4126 (source
4127 (origin
4128 (method git-fetch)
4129 (uri (git-reference
4130 (url "https://github.com/tortoise/tortoise-orm")
4131 (commit version)))
4132 (file-name (git-file-name name version))
4133 (sha256
4134 (base32 "1b1a20cnhaj7rcdp5l1r5nvd6x1amybgynwpd3cnskpvzqjinsyl"))))
4135 (build-system pyproject-build-system)
4136 (arguments
4137 (list
4138 ;; tests: 1280 passed, 104 skipped, 4 xfailed, 9 warnings
4139 #:test-flags
4140 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
4141 "--ignore=tests/benchmarks/"
4142 ;; FileNotFoundError: [Errno 2] No such file or directory: 'uvx'
4143 "--deselect=tests/test_version.py::test_added_by_poetry_v2")))
4144 (native-inputs
4145 (list python-cython
4146 python-fastapi
4147 python-pdm-backend
4148 python-pydantic
4149 python-pytest
4150 python-pytest-xdist))
4151 (propagated-inputs
4152 (list python-aiosqlite
4153 python-anyio
4154 python-iso8601
4155 python-pypika-tortoise
4156 python-pytz
4157 ;; [optional]
4158 python-aiomysql ;tortoise/backends/mysql/client.py
4159 python-asyncodbc ;tortoise/backends/odbc/client.py
4160 python-asyncpg ;tortoise/backends/asyncpg/client.py
4161 python-ciso8601
4162 python-orjson
4163 python-psycopg ;tortoise/backends/psycopg/client.py
4164 python-psycopg-pool ;
4165 python-pyodbc ;tortoise/backends/oracle/client.py
4166 python-uvloop))
4167 (home-page "https://github.com/tortoise/tortoise-orm")
4168 (synopsis "Asynchronous Object Relational Mapper (ORM) for Python")
4169 (description "Tortoise ORM is an easy-to-use asyncio ORM (Object
4170Relational Mapper) inspired by Django. Tortoise ORM was built with relations
4171in mind and admiration for the excellent and popular Django ORM. It's
4172engraved in its design that you are working not with just tables, you work
4173with relational data.")
4174 (license license:asl2.0)))
4175
4176(define-public python-tortoise-vector
4177 (package
4178 (name "python-tortoise-vector")
4179 (version "0.2.0")
4180 (source
4181 (origin
4182 (method url-fetch)
4183 (uri (pypi-uri "tortoise_vector" version))
4184 (sha256
4185 (base32 "09607748biibqs5d7q186x09jcpm0126qmvzqnd80yfmiif2ls97"))))
4186 (build-system pyproject-build-system)
4187 (arguments
4188 (list #:tests? #f)) ;no tests
4189 (native-inputs
4190 (list python-poetry-core
4191 python-poetry-dynamic-versioning))
4192 (propagated-inputs
4193 (list python-tortoise-orm))
4194 (home-page "https://github.com/Chr0nos/tortoise_vector")
4195 (synopsis "Tortoise-ORM pgvector implementation")
4196 (description
4197 "This package adds the support of @code{pgvector} vectors to
4198Tortoise-ORM as a new type of fields, it helps to filter/order by cosine
4199similarity distances for scementic search using embeddings.")
4200 (license license:expat)))
4201
4202(define-public python-piccolo
4203 (package
4204 (name "python-piccolo")
4205 (version "1.34.0")
4206 (source
4207 (origin
4208 (method git-fetch)
4209 (uri (git-reference
4210 (url "https://github.com/piccolo-orm/piccolo/")
4211 (commit version)))
4212 (file-name (git-file-name name version))
4213 (sha256
4214 (base32 "03wnwj6gk39c6i1hymwy80ncafby9xy4phg1nw1jzzcmzpf8zps8"))))
4215 (build-system pyproject-build-system)
4216 (arguments
4217 ;; A local database must be running with credentials explained in
4218 ;; https://github.com/piccolo-orm/piccolo/tree/master/tests
4219 (list #:tests? #f))
4220 (native-inputs
4221 (list python-setuptools))
4222 (propagated-inputs
4223 (list python-black ;this is listed in requirements.txt
4224 python-colorama
4225 python-email-validator
4226 python-inflection
4227 python-jinja2
4228 python-pydantic
4229 python-targ
4230 python-typing-extensions))
4231 (home-page "https://github.com/piccolo-orm/piccolo")
4232 (synopsis "ORM and query builder which supports asyncio")
4233 (description
4234 "Piccolo is a fast, user friendly @acronym{Object–relational mapping,
4235ORM} and query builder which supports asyncio and is fully type-annotated.")
4236 (license license:expat)))
4237
4238(define-public aerich
4239 (package
4240 (name "aerich")
4241 (version "0.9.2")
4242 (source
4243 (origin
4244 (method git-fetch)
4245 (uri (git-reference
4246 (url "https://github.com/tortoise/aerich")
4247 (commit (string-append "v" version))))
4248 (file-name (git-file-name name version))
4249 (sha256
4250 (base32 "07h02lv6r1hf4jjzfsd8g9yxn5df6i5qj8gmrvm2php97x45v84j"))))
4251 (build-system pyproject-build-system)
4252 (arguments
4253 (list
4254 ;; tests: 56 passed, 7 skipped, 1 deselected, 1 warning
4255 #:test-flags
4256 ;; FileNotFoundError: [Errno 2] No such file or directory: 'uvx'
4257 #~(list "--deselect=tests/test_python_m.py::test_poetry_add")))
4258 (native-inputs
4259 (list python-cryptography
4260 python-pdm-backend
4261 python-pydantic
4262 python-pydantic-settings
4263 python-pytest
4264 python-pytest-asyncio
4265 python-pytest-mock
4266 python-tortoise-vector))
4267 (inputs
4268 (list python-anyio
4269 python-asyncclick
4270 python-dictdiffer
4271 python-tortoise-orm
4272 ;; [optional]
4273 python-aiomysql
4274 python-asyncmy
4275 python-asyncpg
4276 python-psycopg
4277 python-tomli-w))
4278 (home-page "https://github.com/tortoise/aerich")
4279 (synopsis "Database migrations tool for Tortoise @acronym{ORM, Object Relational
4280Mapper}")
4281 (description
4282 "This package provides @code{aerich}, a Python database migrations tool
4283for Tortoise @acronym{ORM, Object Relational Mapper}. It can be used both
4284programmatically or as a standalone CLI application.")
4285 (license license:asl2.0)))
4286
4287(define-public sqlcipher
4288 (package
4289 (name "sqlcipher")
4290 (version "3.4.2")
4291 (source
4292 (origin
4293 (method git-fetch)
4294 (uri (git-reference
4295 (url "https://github.com/sqlcipher/sqlcipher")
4296 (commit (string-append "v" version))))
4297 (sha256
4298 (base32 "168wb6fvyap7y8j86fb3xl5rd4wmhiq0dxvx9wxwi5kwm1j4vn1a"))
4299 (file-name (git-file-name name version))))
4300 (build-system gnu-build-system)
4301 (inputs
4302 (list openssl
4303 tcl)) ;for tests
4304 (native-inputs
4305 (list tcl))
4306 (arguments
4307 '(#:configure-flags
4308 '("--enable-tempstore=yes"
4309 "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3"
4310 "LDFLAGS=-lcrypto -ltcl8.6"
4311 "--disable-tcl")
4312 ;; tests cannot be run from the Makefile
4313 ;; see: <https://github.com/sqlcipher/sqlcipher/issues/172>
4314 #:test-target "testfixture"
4315 #:phases
4316 (modify-phases %standard-phases
4317 (add-before 'check 'build-test-runner
4318 (assoc-ref %standard-phases 'check))
4319 (replace 'check
4320 (lambda _
4321 (invoke "./testfixture" "test/crypto.test"))))))
4322 (home-page "https://www.zetetic.net/sqlcipher/")
4323 (synopsis
4324 "Library providing transparent encryption of SQLite database files")
4325 (description "SQLCipher is an implementation of SQLite, extended to
4326provide transparent 256-bit AES encryption of database files. Pages are
4327encrypted before being written to disk and are decrypted when read back. It’s
4328well suited for protecting embedded application databases and for mobile
4329development.")
4330 ;; The source files
4331 ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c},
4332 ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl,
4333 ;; test/crypto.test are licensed under a 3-clause BSD license. All other
4334 ;; source files are in the public domain.
4335 (license (list license:public-domain license:bsd-3))))
4336
4337(define-public python-pyodbc
4338 (package
4339 (name "python-pyodbc")
4340 (version "5.2.0")
4341 (source
4342 (origin
4343 (method url-fetch)
4344 (uri (pypi-uri "pyodbc" version))
4345 (sha256
4346 (base32 "1xd88k6rngm9n8z3klb0g94csa9m8sk7df544vpfxpf816cf72yy"))
4347 (modules '((guix build utils)))
4348 (snippet
4349 ;; Delete precompiled binaries. The corresponding source is included.
4350 #~(for-each delete-file (find-files "." "\\.pyc$")))))
4351 (build-system pyproject-build-system)
4352 (inputs (list unixodbc))
4353 (native-inputs (list python-pytest python-setuptools python-wheel))
4354 (arguments
4355 ;; XXX Tests fail with [unixODBC][Driver Manager]Data source name not
4356 ;; found and no default driver specified (0) (SQLDriverConnect)
4357 (list #:tests? #f))
4358 (home-page "https://github.com/mkleehammer/pyodbc")
4359 (synopsis "Python ODBC Library")
4360 (description "@code{python-pyodbc} provides a Python DB-API driver
4361for ODBC.")
4362 (license (license:x11-style "file:///LICENSE.TXT"))))
4363
4364(define-public mdbtools
4365 (package
4366 (name "mdbtools")
4367 (version "1.0.1")
4368 (source
4369 (origin
4370 (method git-fetch)
4371 (uri (git-reference
4372 (url "https://github.com/mdbtools/mdbtools")
4373 (commit (string-append "v" version))))
4374 (file-name (git-file-name name version))
4375 (sha256
4376 (base32 "1yswq95n2i22dqzi8myz1ppi2207gpxaji2kiplxzisa0s0hasax"))))
4377 (build-system gnu-build-system)
4378 (arguments
4379 (list
4380 #:configure-flags
4381 #~(list (string-append "--with-unixodbc="
4382 #$(this-package-input "unixodbc")))))
4383 (inputs (list glib unixodbc))
4384 (native-inputs
4385 (list autoconf
4386 automake
4387 bison
4388 flex
4389 gettext-minimal
4390 libtool
4391 pkg-config
4392 txt2man
4393 which))
4394 (home-page "https://github.com/mdbtools/mdbtools")
4395 (synopsis "Read Microsoft Access databases")
4396 (description "MDB Tools is a set of tools and applications to read the
4397proprietary MDB file format used in Microsoft's Access database package. This
4398includes programs to export schema and data from Microsoft's Access database
4399file format to CSV and JSON as well as to other databases such as MySQL,
4400Oracle, Sybase, PostgreSQL, etc., and an SQL engine for performing simple SQL
4401queries.")
4402 (license (list license:lgpl2.0
4403 license:gpl2+))))
4404
4405(define-public python-lmdb
4406 (package
4407 (name "python-lmdb")
4408 (version "1.0.0")
4409 (source
4410 (origin
4411 (method url-fetch)
4412 (uri (pypi-uri "lmdb" version))
4413 (sha256
4414 (base32 "1di1gj2agbxwqqwrpk4w58dpfah0kl10ha20s63dlqdd1bgzydj1"))
4415 (snippet
4416 ;; Delete bundled lmdb source files.
4417 #~(for-each delete-file
4418 '("lib/lmdb.h" "lib/mdb.c" "lib/midl.c" "lib/midl.h")))))
4419 (build-system pyproject-build-system)
4420 (arguments
4421 (list
4422 #:phases
4423 #~(modify-phases %standard-phases
4424 (add-before 'build 'use-system-lmdb
4425 (lambda* (#:key inputs #:allow-other-keys)
4426 (let ((lmdb (assoc-ref inputs "lmdb")))
4427 (setenv "LMDB_PURE" "set") ;don't apply env-copy-txn.patch
4428 (setenv "LMDB_FORCE_SYSTEM" "set")
4429 (setenv "LMDB_INCLUDEDIR"
4430 (string-append lmdb "/include"))
4431 (setenv "LMDB_LIBDIR"
4432 (string-append lmdb "/lib"))))))))
4433 (native-inputs (list python-pytest python-setuptools python-wheel))
4434 (inputs (list lmdb))
4435 (home-page "https://github.com/dw/py-lmdb")
4436 (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
4437 (description
4438 "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
4439Memory-Mapped Database} (LMDB), a high-performance key-value store.")
4440 (license (list license:openldap2.8
4441 ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
4442 ;; but not actually needed on platforms currently supported by Guix.
4443 license:bsd-3))))
4444
4445(define-public virtuoso-ose
4446 (package
4447 (name "virtuoso-ose")
4448 (version "7.2.15")
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (uri (string-append "mirror://sourceforge/virtuoso/virtuoso/" version "/"
4453 "virtuoso-opensource-" version ".tar.gz"))
4454 (sha256
4455 (base32 "1nz6kddwxz5k79g3skj7y45f0l20m8fh8haw42j313xm177xpdp0"))
4456 (modules '((guix build utils)))
4457 ;; This snippet removes pre-built Java archives.
4458 (snippet
4459 #~(for-each delete-file-recursively
4460 (find-files "." "\\.jar$")))))
4461 (build-system gnu-build-system)
4462 (arguments
4463 (list
4464 #:tests? #f ; tests require a network connection
4465 ;; TODO: Removing the libsrc/zlib source directory breaks the build.
4466 ;; This indicates that the internal zlib code may still be used.
4467 #:configure-flags
4468 #~(list "--without-internal-zlib"
4469 "--with-readline"
4470 "--enable-static=no")
4471 #:phases
4472 #~(modify-phases %standard-phases
4473 (add-after 'unpack 'avoid-embedding-kernel-and-timestamps
4474 ;; For a reproducible build, avoid embedding the kernel version and
4475 ;; timestamps.
4476 (lambda _
4477 (substitute*
4478 (list "bin/makever"
4479 "appsrc/ODS-Polls/make_vad.sh"
4480 "appsrc/ODS-Blog/make_vad.sh"
4481 "appsrc/ODS-Community/make_vad.sh"
4482 "appsrc/ODS-Framework/make_vad.sh"
4483 "appsrc/ODS-Framework/oauth/make_vad.sh"
4484 "appsrc/ODS-WebMail/make_vad.sh"
4485 "appsrc/ODS-Calendar/make_vad.sh"
4486 "appsrc/ODS-Gallery/make_vad.sh"
4487 "appsrc/ODS-Briefcase/make_vad.sh"
4488 "appsrc/ODS-FeedManager/make_vad.sh"
4489 "appsrc/ODS-Bookmark/make_vad.sh"
4490 "appsrc/ODS-Addressbook/make_vad.sh"
4491 "binsrc/samples/demo/make_vad.sh"
4492 "binsrc/samples/demo/mkdoc.sh"
4493 "binsrc/rdf_mappers/make_vad.sh")
4494 (("^UNAME_SYSTEM=.*") "UNAME_SYSTEM=unknown\n")
4495 (("^UNAME_RELEASE=.*") "UNAME_RELEASE=unknown\n")
4496 (("^PACKDATE=.*") "PACKDATE=2012-04-18\n")
4497 (("^DATE=.*") "DATE=2012-04-18\n"))))
4498 ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in
4499 ;; the build output. The following phase removes it.
4500 (add-after 'install 'remove-static-libs
4501 (lambda _
4502 (for-each
4503 (lambda (file)
4504 (delete-file (string-append #$output "/lib/" file)))
4505 '("libvirtuoso-t.a"
4506 "libvirtuoso-t.la")))))))
4507 (native-inputs
4508 (list autoconf automake bison flex gperf libtool python))
4509 (inputs
4510 (list openssl net-tools readline which zlib))
4511 (home-page "https://vos.openlinksw.com/owiki/wiki/VOS/")
4512 (synopsis "Multi-model database system")
4513 (description "Virtuoso is a scalable cross-platform server that combines
4514relational, graph, and document data management with web application server
4515and web services platform functionality.")
4516 ;; configure: error: ... can only be build on 64bit platforms
4517 (supported-systems %64bit-supported-systems)
4518 (license license:gpl2)))
4519
4520(define-public python-ccm
4521 (package
4522 (name "python-ccm")
4523 (version "3.1.5")
4524 (source
4525 (origin
4526 (method url-fetch)
4527 (uri (pypi-uri "ccm" version))
4528 (sha256
4529 (base32
4530 "0v1jahchm9czcdhynfy76mca52k6jbvngm60jqdwxlhnf6iw0z7h"))))
4531 (build-system pyproject-build-system)
4532 (arguments
4533 ;; TODO: tests require a complex setup, see <.github/workflows/main.yml>.
4534 (list #:tests? #f))
4535 (native-inputs
4536 (list python-pbr))
4537 (propagated-inputs
4538 (list python-pyyaml
4539 python-psutil
4540 python-six)) ;XXX: hard dependency
4541 (home-page "https://github.com/pcmanus/ccm")
4542 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
4543localhost")
4544 (description "Cassandra Cluster Manager is a development tool for testing
4545local Cassandra clusters. It creates, launches and removes Cassandra clusters
4546on localhost.")
4547 (license license:asl2.0)))
4548
4549(define-public python-sqlalchemy
4550 (package
4551 (name "python-sqlalchemy")
4552 (version "1.4.54")
4553 (source
4554 (origin
4555 (method url-fetch)
4556 (uri (pypi-uri "SQLAlchemy" version))
4557 (sha256
4558 (base32 "06n36zs280iahxj34fvq1iwq3zjlmvsalfcanwhdqdcc13nznw24"))))
4559 (build-system pyproject-build-system)
4560 (native-inputs
4561 (list python-cython ; for C extensions
4562 python-pytest python-mock python-pytest-xdist ; for tests
4563 python-setuptools python-wheel))
4564 (propagated-inputs
4565 (list python-greenlet))
4566 (arguments
4567 (list
4568 #:test-flags
4569 '(list ;; The memory usage tests are very expensive and run in sequence;
4570 ;; skip them.
4571 "-k" "not test_memusage.py")))
4572 (home-page "https://www.sqlalchemy.org")
4573 (synopsis "Database abstraction library")
4574 (description
4575 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4576gives application developers the full power and flexibility of SQL. It
4577provides a full suite of well known enterprise-level persistence patterns,
4578designed for efficient and high-performing database access, adapted into a
4579simple and Pythonic domain language.")
4580 (license license:x11)))
4581
4582(define-public python-sqlalchemy-2
4583 (package
4584 (name "python-sqlalchemy")
4585 (version "2.0.45")
4586 (source
4587 (origin
4588 (method url-fetch)
4589 (uri (pypi-uri "sqlalchemy" version))
4590 (sha256
4591 (base32 "126fxwlk5kd0vwymw3pfmayl29c8il2n6qxdzl1mglnjm2ys8chn"))))
4592 (build-system pyproject-build-system)
4593 (arguments
4594 (list
4595 #:test-flags
4596 ;; Remove expensive tests.
4597 #~(list "--ignore=test/aaa_profiling/test_memusage.py"
4598 "--ignore=test/ext/mypy/test_mypy_plugin_py3k.py"
4599 "--ignore=test/typing/test_mypy.py"
4600 ;; Disable a test that fails randomly.
4601 "-k" "test_recycle_pool_no_race")))
4602 (native-inputs
4603 (list python-cython
4604 python-pytest
4605 python-setuptools))
4606 (propagated-inputs
4607 (list python-greenlet
4608 python-typing-extensions))
4609 (home-page "https://www.sqlalchemy.org")
4610 (synopsis "SQL toolkit and object relational mapper")
4611 (description
4612 "SQLAlchemy is the Python SQL toolkit and @acronym{ORM, Object Relational
4613Mapper} that gives application developers the full power and flexibility of
4614SQL. It provides a full suite of well known enterprise-level persistence
4615patterns, designed for efficient and high-performing database access, adapted
4616into a simple and Pythonic domain language.")
4617 (license license:expat)))
4618
4619(define-public python-sqlalchemy-utils
4620 (package
4621 (name "python-sqlalchemy-utils")
4622 (version "0.42.1")
4623 (source
4624 (origin
4625 (method git-fetch)
4626 (uri (git-reference
4627 (url "https://github.com/kvesteri/sqlalchemy-utils")
4628 (commit version)))
4629 (file-name (git-file-name name version))
4630 (sha256
4631 (base32 "0ny1p352p0dlgrf9fnmzj7ld1rga5zj698qpla1kdaliwwh6xawn"))))
4632 (build-system pyproject-build-system)
4633 (arguments
4634 (list
4635 #:test-flags
4636 ;; XXX: These tests require additional inputs.
4637 #~(list "--deselect=tests/test_views.py::TestMySqlTrivialView"
4638 "--deselect=tests/functions/test_database.py::\
4639TestDatabasePostgresPg8000::test_create_and_drop"
4640 "--deselect=tests/functions/test_database.py::\
4641TestDatabasePostgresPsycoPG2CFFI::test_create_and_drop")
4642 #:phases
4643 #~(modify-phases %standard-phases
4644 (add-before 'check 'start-postgresql
4645 (lambda* (#:key inputs tests? #:allow-other-keys)
4646 (when tests?
4647 (setenv "TZDIR" (search-input-directory inputs
4648 "share/zoneinfo"))
4649 (let ((dbdir (string-append (getcwd) "/../pgdir")))
4650 (setenv "SQLALCHEMY_UTILS_TEST_POSTGRESQL_USER"
4651 "nixbld")
4652 (invoke "initdb" "-D" dbdir)
4653 (invoke "pg_ctl" "-D" dbdir
4654 "-o" (string-append "-k " dbdir)
4655 "-l" (string-append dbdir "/db.log")
4656 "start")
4657 (invoke "psql" "-h" dbdir "-d" "postgres"
4658 "-c" "CREATE DATABASE sqlalchemy_utils_test;"))))))))
4659 (propagated-inputs (list python-six python-sqlalchemy))
4660 (native-inputs
4661 (list postgresql
4662 python-dateutil
4663 python-flexmock
4664 python-psycopg2
4665 python-pytest
4666 python-pytz
4667 python-setuptools
4668 tzdata-for-tests))
4669 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4670 (synopsis "Various utility functions for SQLAlchemy")
4671 (description
4672 "SQLAlchemy-utils provides various utility functions and custom data types
4673for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4674
4675You might also want to install the following optional dependencies:
4676@enumerate
4677@item @code{python-passlib}
4678@item @code{python-babel}
4679@item @code{python-cryptography}
4680@item @code{python-pytz}
4681@item @code{python-psycopg2}
4682@item @code{python-furl}
4683@item @code{python-flask-babel}
4684@end enumerate
4685")
4686 (license license:bsd-3)))
4687
4688;; python-alchemy-mock is abandoned, last commit in 2019, no maintained fork.
4689;; Perhaps deprecate and remove with the python-six cleanup.
4690(define-public python-alchemy-mock
4691 (package
4692 (name "python-alchemy-mock")
4693 (version "0.4.3")
4694 (home-page "https://github.com/miki725/alchemy-mock")
4695 (source
4696 (origin
4697 (method git-fetch)
4698 (uri (git-reference
4699 (url "https://github.com/miki725/alchemy-mock")
4700 (commit version)))
4701 (file-name (git-file-name name version))
4702 (sha256
4703 (base32 "053gj8d8ca5kpp7v61wd7lcm9mqp9xqz3d8pp9spdbcjsaqz9nk9"))
4704 (snippet #~(begin
4705 (use-modules (guix build utils))
4706 (substitute* "alchemy_mock/comparison.py"
4707 (("collections\\.Mapping")
4708 "collections.abc.Mapping"))))))
4709 (build-system pyproject-build-system)
4710 (arguments
4711 (list
4712 #:test-flags
4713 #~(list "--doctest-modules" "alchemy_mock")))
4714 (native-inputs (list python-mock python-pytest python-setuptools
4715 python-wheel))
4716 (propagated-inputs (list python-sqlalchemy python-six))
4717 (synopsis "Mock helpers for SQLAlchemy")
4718 (description
4719 "This package provides mock helpers for SQLAlchemy that makes it easy
4720to mock an SQLAlchemy session while preserving the ability to do asserts.
4721
4722Normally Normally SQLAlchemy's expressions cannot be easily compared as
4723comparison on binary expression produces yet another binary expression, but
4724this library provides functions to facilitate such comparisons.")
4725 (license license:expat)))
4726
4727(define-public python-alembic
4728 (package
4729 (name "python-alembic")
4730 (version "1.18.1")
4731 (source
4732 (origin
4733 (method url-fetch)
4734 (uri (pypi-uri "alembic" version))
4735 (sha256
4736 (base32 "0rmq5z30vmv5x5c355mj2whjz1m086c0k4xqndpq35lm6n0npb43"))))
4737 (build-system pyproject-build-system)
4738 (arguments
4739 (list
4740 #:test-flags
4741 #~(list "--ignore=tests/integration")))
4742 (native-inputs
4743 (list python-black ; runs a hook in tests.
4744 python-mock
4745 python-pytest
4746 python-setuptools
4747 python-tzdata))
4748 (propagated-inputs
4749 (list python-mako
4750 python-sqlalchemy-2
4751 python-tomli
4752 python-typing-extensions))
4753 (home-page "https://github.com/sqlalchemy/alembic")
4754 (synopsis "Database migration tool for SQLAlchemy")
4755 (description
4756 "Alembic is a lightweight database migration tool for usage with the
4757SQLAlchemy Database Toolkit for Python.")
4758 (license license:expat)))
4759
4760(define-public python-sqlite-fts4
4761 (package
4762 (name "python-sqlite-fts4")
4763 (version "1.0.3")
4764 (source
4765 (origin
4766 (method git-fetch)
4767 (uri (git-reference
4768 (url "https://github.com/simonw/sqlite-fts4")
4769 (commit version)))
4770 (file-name (git-file-name name version))
4771 (sha256
4772 (base32 "05c69n4nrc9srkbih1q1wxlw6n9mb3dm7ysb47ipqjn3rp1aif11"))))
4773 (build-system pyproject-build-system)
4774 (native-inputs (list python-pytest python-setuptools))
4775 (home-page "https://github.com/simonw/sqlite-fts4")
4776 (synopsis "Python functions for working with SQLite FTS4 search")
4777 (description
4778 "This package provides custom SQLite functions written in Python for
4779ranking documents indexed using the SQLite's FTS4 full text search
4780extension.")
4781 (license license:asl2.0)))
4782
4783(define-public python-sqlite-utils
4784 (package
4785 (name "python-sqlite-utils")
4786 (version "3.38")
4787 (source (origin
4788 (method git-fetch) ;for tests
4789 (uri (git-reference
4790 (url "https://github.com/simonw/sqlite-utils")
4791 (commit version)))
4792 (file-name (git-file-name name version))
4793 (sha256
4794 (base32
4795 "1rai8rbw5drxppypyl3r8j9gr12278h3snkj7l280zkskbxxh7hf"))))
4796 (build-system pyproject-build-system)
4797 (arguments
4798 (list #:phases #~(modify-phases %standard-phases
4799 (add-after 'unpack 'relax-requirements
4800 (lambda _
4801 (substitute* "setup.py"
4802 ;; This is a variant designed to have a binary
4803 ;; wheel made available on PyPI, which is not a
4804 ;; concern to Guix.
4805 (("click-default-group-wheel")
4806 "click-default-group")))))))
4807 (propagated-inputs (list python-click python-click-default-group
4808 python-dateutil python-sqlite-fts4
4809 python-tabulate))
4810 (native-inputs (list python-pytest python-setuptools python-wheel))
4811 (home-page "https://github.com/simonw/sqlite-utils")
4812 (synopsis
4813 "CLI tool and Python utility functions for manipulating SQLite databases")
4814 (description
4815 "This package provides a CLI tool and Python utility functions for
4816manipulating SQLite databases. It's main features are:
4817@itemize
4818@item
4819Pipe JSON (or CSV or TSV) directly into a new SQLite database file,
4820automatically creating a table with the appropriate schema.
4821@item
4822Run in-memory SQL queries, including joins, directly against data in
4823CSV, TSV or JSON files and view the results.
4824@item
4825Configure SQLite full-text search against your database tables and run
4826search queries against them, ordered by relevance.
4827@item
4828Run transformations against your tables to make schema changes that
4829SQLite ALTER TABLE does not directly support, such as changing the type
4830of a column.
4831@item
4832Extract columns into separate tables to better normalize your existing
4833data.
4834@end itemize")
4835 (license license:asl2.0)))
4836
4837(define-public python-pickleshare
4838 (package
4839 (name "python-pickleshare")
4840 (version "0.7.5")
4841 (source
4842 (origin
4843 (method url-fetch)
4844 (uri (pypi-uri "pickleshare" version))
4845 (sha256
4846 (base32 "1jmghg3c53yp1i8cm6pcrm280ayi8621rwyav9fac7awjr3kss47"))))
4847 (build-system pyproject-build-system)
4848 (native-inputs
4849 (list python-pytest
4850 python-setuptools
4851 python-wheel))
4852 (home-page "https://github.com/vivainio/pickleshare")
4853 (synopsis "Tiny key value database with concurrency support")
4854 (description
4855 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4856Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4857shelve, many processes can access the database simultaneously. Changing a
4858value in database is immediately visible to other processes accessing the same
4859database. Concurrency is possible because the values are stored in separate
4860files. Hence the “database” is a directory where all files are governed by
4861PickleShare.")
4862 (license license:expat)))
4863
4864(define-public python-apsw
4865 (package
4866 (name "python-apsw")
4867 (version "3.50.4.0")
4868 (source
4869 (origin
4870 (method git-fetch)
4871 (uri (git-reference
4872 (url "https://github.com/rogerbinns/apsw")
4873 (commit version)))
4874 (file-name (git-file-name name version))
4875 (sha256
4876 (base32 "0r9awjgpl9cmqz5xd4zbqrpiv0rv5c36a18jkqnsfky6n6sgr424"))))
4877 (build-system pyproject-build-system)
4878 (arguments
4879 (list #:test-backend #~'custom
4880 #:test-flags #~(list "-m" "apsw.tests")))
4881 (native-inputs
4882 (list python-setuptools))
4883 (inputs
4884 (list sqlite-next)) ;SQLite 3.45.1 required.
4885 (home-page "https://github.com/rogerbinns/apsw/")
4886 (synopsis "Another Python SQLite Wrapper")
4887 (description
4888 "APSW is a Python wrapper for the SQLite embedded relational database
4889engine. In contrast to other wrappers such as pysqlite it focuses on being a
4890minimal layer over SQLite attempting just to translate the complete SQLite API
4891into Python.")
4892 (license license:zlib)))
4893
4894(define-public python-aiosqlite
4895 (package
4896 (name "python-aiosqlite")
4897 (version "0.21.0")
4898 (source
4899 (origin
4900 (method git-fetch)
4901 (uri (git-reference
4902 (url "https://github.com/omnilib/aiosqlite")
4903 (commit (string-append "v" version))))
4904 (file-name (git-file-name name version))
4905 (sha256
4906 (base32 "1njzxi130bbix53wl0gcsvryk1b2cazq0s2701jbkf6nvr3ywpyy"))))
4907 (build-system pyproject-build-system)
4908 (native-inputs (list python-flit-core python-packaging))
4909 (propagated-inputs (list python-typing-extensions))
4910 (home-page "https://github.com/jreese/aiosqlite")
4911 (synopsis "Asyncio bridge for sqlite3")
4912 (description
4913 "The package aiosqlite replicates the standard sqlite3 module, but with
4914async versions of all the standard connection and cursor methods, and context
4915managers for automatically closing connections.")
4916 (license license:expat)))
4917
4918(define-public python-databases
4919 (package
4920 (name "python-databases")
4921 ;; 0.9.0 needs sqlalchemy>=2.0.7
4922 ;; 0.8.0 needs sqlalchemy>=1.4.42,<1.5
4923 (version "0.8.0")
4924 (source
4925 (origin
4926 (method git-fetch)
4927 (uri (git-reference
4928 (url "https://github.com/encode/databases")
4929 (commit version)))
4930 (file-name (git-file-name name version))
4931 (sha256
4932 (base32 "183yawn8w561y1ni117rf5zaxm4gqqbcmi9fp52xd5fx2dj8qy3v"))))
4933 (build-system pyproject-build-system)
4934 (arguments
4935 (list
4936 #:test-flags
4937 ;; These need TEST_DATABASE_URLS set.
4938 ;; TODO: Use "sqlite:///test.db"? See docs/contributing.md.
4939 #~(list "--ignore=tests/test_databases.py"
4940 "--ignore=tests/test_integration.py"
4941 "--ignore=tests/test_connection_options.py")))
4942 (native-inputs
4943 (list python-httpx
4944 python-psycopg
4945 python-pytest
4946 python-setuptools
4947 python-starlette))
4948 (propagated-inputs
4949 (list python-aiosqlite
4950 python-aiopg
4951 python-aiomysql
4952 python-asyncpg
4953 python-asyncmy
4954 python-sqlalchemy))
4955 (home-page "https://github.com/encode/databases")
4956 (synopsis "Asynchronous database abstraction library")
4957 (description "Databases provides a wrapper around asynchronous database
4958libraries with SQLALchemy.")
4959 (license license:bsd-3)))
4960
4961(define-public python-psycopg2
4962 (package
4963 (name "python-psycopg2")
4964 (version "2.9.11")
4965 (source
4966 (origin
4967 (method git-fetch)
4968 (uri (git-reference
4969 (url "https://github.com/psycopg/psycopg2")
4970 (commit version)))
4971 (file-name (git-file-name name version))
4972 (sha256
4973 (base32 "04l2yzbl15nrw1pcjfkqycvqn6h9phcdh1xx9ynfy3dzfscq5ly5"))))
4974 (build-system pyproject-build-system)
4975 (arguments
4976 (list
4977 #:phases
4978 #~(modify-phases %standard-phases
4979 (add-before 'check 'start-postgresql
4980 (lambda* (#:key inputs tests? #:allow-other-keys)
4981 (when tests?
4982 (setenv "TZDIR" (search-input-directory inputs
4983 "share/zoneinfo"))
4984 (let ((dbdir (string-append (getcwd) "/../pgdir")))
4985 (setenv "PSYCOPG2_TESTDB_USER" "nixbld")
4986 (setenv "PSYCOPG2_TESTDB_HOST" dbdir)
4987 (invoke "initdb" "-D" dbdir)
4988 (invoke "pg_ctl" "-D" dbdir
4989 "-o" (string-append "-k " dbdir)
4990 "-l" (string-append dbdir "/db.log")
4991 "start")
4992 (invoke "psql" "-h" dbdir "-d" "postgres"
4993 "-c" "CREATE DATABASE psycopg2_test;"))))))))
4994 (native-inputs
4995 (list postgresql
4996 python-pytest
4997 python-setuptools
4998 tzdata-for-tests))
4999 (inputs
5000 (list postgresql)) ; libpq
5001 (home-page "https://www.psycopg.org/")
5002 (synopsis "Python PostgreSQL adapter")
5003 (description
5004 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API
50052.0.")
5006 (license license:lgpl3+)))
5007
5008(define-public python-psycopg-pool
5009 (package
5010 (name "python-psycopg-pool")
5011 ;; The connection pooling code is on a different release cadence
5012 ;; from the driver code, so fetch the latest PyPI release.
5013 (version "3.1.7")
5014 (source (origin
5015 (method url-fetch)
5016 (uri (pypi-uri "psycopg-pool" version))
5017 (sha256
5018 (base32
5019 "1pkx7nj1mhacwpna7ldzqfqxd1xg8826600r0bs9ad1h93f429yh"))))
5020 (build-system pyproject-build-system)
5021 (arguments
5022 (list
5023 #:tests? #f ;run for psycopg below
5024 #:phases
5025 #~(modify-phases %standard-phases
5026 ;; This module requires 'psycopg', however psycopg needs this
5027 ;; for its tests. Disable sanity check to break the cycle.
5028 (delete 'sanity-check))))
5029 (native-inputs (list python-setuptools))
5030 (home-page "https://www.psycopg.org/")
5031 (synopsis "Connection pooler for psycopg")
5032 (description
5033 "This module provides connection pool implementations that can be used
5034with the @code{psycopg} PostgreSQL driver.")
5035 (license license:lgpl3+)))
5036
5037(define-public python-psycopg
5038 (package
5039 (name "python-psycopg")
5040 (version "3.3.4")
5041 (source
5042 (origin
5043 (method git-fetch)
5044 (uri (git-reference
5045 (url "https://github.com/psycopg/psycopg")
5046 (commit version)))
5047 (file-name (git-file-name name version))
5048 (sha256
5049 (base32 "0kp9pig5hv2378zllmb6kmmabydmp98k8qacmm8098cspb0jqy44"))))
5050 (build-system pyproject-build-system)
5051 (arguments
5052 (list
5053 #:test-flags
5054 #~(list "-o" "asyncio_mode=auto"
5055 ;; FIXME: Many of the typing tests are failing,
5056 ;; conveniently tagged as slow...
5057 "-k" "not slow"
5058 ;; Tests are in parent directory due to the chdir.
5059 "..")
5060 #:phases
5061 #~(modify-phases %standard-phases
5062 (add-before 'build 'change-directory
5063 (lambda _ (chdir "psycopg")))
5064 (add-after 'build 'build-c-extensions
5065 (lambda _
5066 (with-directory-excursion "../psycopg_c"
5067 ((assoc-ref %standard-phases 'build)))))
5068 (add-after 'install 'install-c-extensions
5069 (lambda* (#:key inputs outputs #:allow-other-keys)
5070 (with-directory-excursion "../psycopg_c"
5071 ((assoc-ref %standard-phases 'install)
5072 #:inputs inputs #:outputs outputs))))
5073 (add-before 'check 'start-postgresql
5074 (lambda* (#:key inputs tests? #:allow-other-keys)
5075 (when tests?
5076 (setenv "TZDIR" (search-input-directory inputs
5077 "share/zoneinfo"))
5078 (let ((dbdir (string-append (getcwd) "/../pgdir")))
5079 (invoke "initdb" "-D" dbdir)
5080 (invoke "pg_ctl" "-D" dbdir
5081 "-o" (string-append "-k " dbdir)
5082 "-l" (string-append dbdir "/db.log")
5083 "start")
5084 (invoke "psql" "-h" dbdir "-d" "postgres"
5085 "-c" "CREATE DATABASE nixbld;"))))))))
5086 (native-inputs
5087 (list python-cython
5088 python-psycopg-pool
5089 python-pytest
5090 python-pytest-asyncio
5091 python-anyio
5092 python-setuptools
5093 python-tenacity
5094 pproxy
5095 tzdata-for-tests))
5096 (inputs
5097 (list postgresql))
5098 (home-page "https://www.psycopg.org/")
5099 (synopsis "PostgreSQL driver for Python")
5100 (description
5101 "Psycopg 3 is a new implementation of the popular @code{psycopg2}
5102database adapter for Python.")
5103 (license license:lgpl3+)))
5104
5105;; XXX: The latest version is from 2018, source was deleted from
5106;; Bitbucket.org, consider to withdraw if it keeps failing.
5107(define-public python-sadisplay
5108 (package
5109 (name "python-sadisplay")
5110 (version "0.4.9")
5111 (source
5112 (origin
5113 (method url-fetch)
5114 (uri (pypi-uri "sadisplay" version))
5115 (sha256
5116 (base32 "15jxwgla3q4xsp6rw8inqaiy1kdzc8l2cixj8amqcf0ji47icrxg"))))
5117 (build-system pyproject-build-system)
5118 (arguments
5119 (list
5120 #:test-flags
5121 #~(list "--deselect=tests/test_describe.py::test_inherits"
5122 "--deselect=tests/test_describe.py::test_single_mapper")))
5123 (native-inputs
5124 (list python-pytest
5125 python-setuptools
5126 python-wheel))
5127 (propagated-inputs
5128 (list python-sqlalchemy))
5129 (home-page "https://bitbucket.org/estin/sadisplay")
5130 (synopsis "SQLAlchemy schema displayer")
5131 (description
5132 "This package provides a program to build Entity Relationship diagrams
5133from a SQLAlchemy model (or directly from the database).")
5134 (license license:bsd-3)))
5135
5136(define-public yoyo-migrations
5137 (package
5138 (name "yoyo-migrations")
5139 (version "9.0.0")
5140 (source
5141 (origin
5142 (method hg-fetch)
5143 (uri (hg-reference
5144 (url "https://hg.sr.ht/~olly/yoyo")
5145 (changeset (string-append "v" version "-release"))))
5146 (file-name (string-append name "-" version "-checkout"))
5147 (sha256
5148 (base32 "0bn4n043y0n4dh7axwavfims2krap5dcmdaxswbadzmis3a4hxyb"))))
5149 (build-system pyproject-build-system)
5150 (arguments
5151 (list
5152 #:phases
5153 #~(modify-phases %standard-phases
5154 (add-before 'check 'start-postgresql
5155 (lambda* (#:key inputs tests? #:allow-other-keys)
5156 (when tests?
5157 (delete-file "test_databases.ini")
5158 (call-with-output-file "test_databases.ini"
5159 (lambda (port)
5160 (format port "[DEFAULT]
5161postgresql = postgresql://nixbld@/yoyo_test~%")))
5162 (setenv "TZDIR" (search-input-directory inputs
5163 "share/zoneinfo"))
5164 (let ((dbdir (string-append (getcwd) "/../pgdir")))
5165 (setenv "PGHOST" dbdir)
5166 (setenv "PGUSER" "nixbld")
5167 (invoke "initdb" "-D" dbdir)
5168 (invoke "pg_ctl" "-D" dbdir
5169 "-o" (string-append "-k " dbdir)
5170 "-l" (string-append dbdir "/db.log")
5171 "start")
5172 (invoke "psql" "-h" dbdir "-d" "postgres"
5173 "-c" "CREATE DATABASE yoyo_test;"))))))))
5174 (native-inputs
5175 (list postgresql
5176 python-freezegun
5177 python-psycopg2
5178 python-pytest
5179 python-setuptools
5180 tms
5181 tzdata-for-tests))
5182 (propagated-inputs
5183 (list python-sqlparse python-tabulate python-importlib-metadata))
5184 (home-page "https://ollycope.com/software/yoyo/latest/")
5185 (synopsis "Database migrations with SQL")
5186 (description
5187 "Yoyo is a database schema migration tool. Migrations are written as SQL
5188files or Python scripts that define a list of migration steps.")
5189 (license license:asl2.0)))
5190
5191(define-public mutastructura
5192 (package
5193 (name "mutastructura")
5194 (version "0.7.1")
5195 (source
5196 (origin
5197 (method git-fetch)
5198 (uri (git-reference
5199 (url "https://codeberg.org/jjba23/mutastructura")
5200 (commit (string-append "v" version))))
5201 (file-name (git-file-name name version))
5202 (sha256
5203 (base32 "0rzy7clbzc580xp1mk2qwqv29lq2xn8sfr9lv1rdczk5fj55m4d6"))))
5204 (build-system guile-build-system)
5205 (arguments
5206 (list
5207 #:source-directory "src"
5208 #:modules '((guix build guile-build-system)
5209 (guix build utils)
5210 (ice-9 match))
5211 #:phases
5212 #~(modify-phases %standard-phases
5213 (add-before 'build 'install-program-files
5214 (lambda _
5215 (let* ((bin (string-append #$output "/bin"))
5216 (share (string-append #$output "/share")))
5217 (copy-recursively "resources"
5218 (string-append share "/resources"))
5219 (install-file "scripts/mutastructura" bin)
5220 (chmod (string-append bin "/mutastructura") #o755))))
5221 (add-after 'unpack 'fix-paths
5222 (lambda* (#:key inputs #:allow-other-keys)
5223 (for-each (match-lambda
5224 ((pattern program format-string)
5225 (substitute* "scripts/mutastructura"
5226 ((pattern)
5227 (format #f format-string
5228 (search-input-file inputs
5229 (string-append "bin/"
5230 program)))))))
5231 '(("readlink -f " "readlink" "~s -f ")
5232 ("realpath " "realpath" "~s ")
5233 ("dirname " "dirname" "~s ")
5234 ("getopt " "getopt" "~s ")
5235 ("exec guile " "guile" "exec ~s "))))))))
5236 (propagated-inputs (list guile-dbi
5237 guile-dbd-mysql
5238 guile-dbd-sqlite3
5239 guile-dbd-postgresql
5240 guile-gcrypt))
5241 (inputs (list guile-3.0 bash-minimal coreutils util-linux))
5242 (home-page "https://codeberg.org/jjba23/mutastructura")
5243 (synopsis "Relational database schema migrations powered by Guile Scheme")
5244 (description
5245 "Mutastructura provides a familiar, declarative and transactional
5246approach to managing database states. It exposes a user-friendly
5247@acronym{CLI, command-line interface} and has support for PostgreSQL, MySQL, and SQLite.
5248It also exposes library functions and can be imported and used directly from other Guile code.
5249
5250Features include executing migrations transactionally and computing SHA256
5251checksums to track schema evolution in a @code{migrations_history} table.")
5252 (license license:agpl3+)))
5253
5254(define-public python-mysqlclient
5255 (package
5256 (name "python-mysqlclient")
5257 (version "2.2.7")
5258 (source
5259 (origin
5260 (method url-fetch)
5261 (uri (pypi-uri "mysqlclient" version))
5262 (sha256
5263 (base32 "0i9q2vj6rb4w2iggk0mcp9jla2rm91sx7jcrgv7grm8njjsj5bi4"))))
5264 (build-system pyproject-build-system)
5265 (arguments
5266 (list #:test-flags
5267 #~'("tests/test__mysql.py" ;tests not needing a live db
5268 "tests/test_MySQLdb_times.py")))
5269 (native-inputs
5270 (list pkg-config python-pytest python-setuptools python-wheel))
5271 (inputs (list mariadb-connector-c))
5272 (home-page "https://github.com/PyMySQL/mysqlclient")
5273 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
5274 (description "MySQLdb is an interface to the popular MySQL database server
5275for Python. The design goals are:
5276@enumerate
5277@item Compliance with Python database API version 2.0 [PEP-0249],
5278@item Thread-safety,
5279@item Thread-friendliness (threads will not block each other).
5280@end enumerate")
5281 (license license:gpl2)))
5282
5283(define-public python-hiredis
5284 (package
5285 (name "python-hiredis")
5286 (version "3.1.0")
5287 (source (origin
5288 (method git-fetch) ;for tests
5289 (uri (git-reference
5290 (url "https://github.com/redis/hiredis-py")
5291 (commit (string-append "v" version))))
5292 (file-name (git-file-name name version))
5293 (sha256
5294 (base32
5295 "1g9qj37phq9989av0bwkqy40f5wx9q08y19dsmzwd1ssqsxwhfav"))
5296 (patches
5297 (search-patches "python-hiredis-use-system-hiredis.patch"))))
5298 (build-system pyproject-build-system)
5299 (native-inputs (list python-pytest python-setuptools python-wheel))
5300 (inputs (list hiredis))
5301 (home-page "https://github.com/redis/hiredis-py")
5302 (synopsis "Python extension that wraps protocol parsing code in hiredis")
5303 (description "Python-hiredis is a python extension that wraps protocol
5304parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
5305 (license license:bsd-3)))
5306
5307(define-public python-fakeredis
5308 (package
5309 (name "python-fakeredis")
5310 (version "2.33.0")
5311 (source
5312 (origin
5313 (method git-fetch)
5314 (uri (git-reference
5315 (url "https://github.com/cunla/fakeredis-py")
5316 (commit (string-append "v" version))))
5317 (file-name (git-file-name name version))
5318 (sha256
5319 (base32 "02zi7dl4dm90z4aiadq8bba4vjhrpj8ns34ziazqcxlm72pyzxms"))))
5320 (build-system pyproject-build-system)
5321 (arguments
5322 (list
5323 ;; tests: 2652 passed, 319 skipped, 194 deselected, 24 warnings
5324 #:test-flags
5325 #~(list "-m" "not slow"
5326 "-k" (string-join
5327 ;; redis.exceptions.ResponseError: unknown command
5328 ;; 'evalsha', with args beginning with:
5329 (list "not test_async_lock[fake_resp2]"
5330 "test_async_lock[fake_resp3]"
5331 ;; AssertionError: Commands not found in category
5332 ;; b'write'...
5333 "test_acl_cat[StrictRedis2]"
5334 "test_acl_cat[StrictRedis3]")
5335 " and not "))
5336 #:phases
5337 #~(modify-phases %standard-phases
5338 ;; Tests require a running Redis server.
5339 (add-before 'check 'start-redis
5340 (lambda* (#:key tests? #:allow-other-keys)
5341 (when tests?
5342 (invoke "redis-server" "--daemonize" "yes"
5343 "--port" "6390")))))))
5344 (native-inputs
5345 (list python-hatchling
5346 python-pytest
5347 python-pytest-asyncio
5348 python-pytest-mock
5349 redis))
5350 (propagated-inputs
5351 (list python-redis
5352 python-sortedcontainers
5353 python-valkey))
5354 (home-page "https://github.com/cunla/fakeredis-py")
5355 (synopsis "Fake implementation of redis API for testing purposes")
5356 (description
5357 "Fakeredis is a pure-Python implementation of the redis-py Python client
5358that simulates talking to a redis server. It was created for a single purpose:
5359to write unit tests.
5360
5361Setting up redis is not hard, but one often wants to write unit tests that don't
5362talk to an external server such as redis. This module can be used as a
5363reasonable substitute.")
5364 (license license:bsd-3)))
5365
5366(define-public python-redis
5367 (package
5368 (name "python-redis")
5369 (version "7.1.0")
5370 (source
5371 (origin
5372 (method git-fetch)
5373 (uri (git-reference
5374 (url "https://github.com/redis/redis-py")
5375 (commit (string-append "v" version))))
5376 (file-name (git-file-name name version))
5377 (sha256
5378 (base32 "0c2794r5xcqdqaqr1vr3ibi6lb5rvxg002ichjb42xhlbpd4860j"))))
5379 (build-system pyproject-build-system)
5380 (arguments
5381 (list
5382 #:test-flags
5383 #~(list
5384 ;; These tests are disabled in the official CI run (see:
5385 ;; https://raw.githubusercontent.com/redis/redis-py/master/
5386 ;; .github/workflows/install_and_test.sh).
5387 "-m" "not onlycluster and not redismod and not ssl"
5388 "--ignore=tests/test_scenario"
5389 "--ignore=tests/test_asyncio/test_scenario"
5390 ;; XXX: Those tests require the unpackaged "pybreaker".
5391 "--ignore=tests/test_multidb"
5392 "--ignore=tests/test_asyncio/test_multidb"
5393 ;; XXX: Those tests require the unpackaged "redis_entraid".
5394 "--ignore=tests/test_credentials.py"
5395 "--ignore=tests/test_asyncio/test_credentials.py"
5396 ;; XXX: Those test fail with ConnectionError.
5397 "--ignore=tests/test_sentinel.py"
5398 "--ignore=tests/test_asyncio/test_sentinel.py"
5399 "--deselect=tests/test_commands.py::TestRedisCommands::test_psync"
5400 "--deselect=tests/test_commands.py::TestRedisCommands::\
5401test_xgroup_create_entriesread")
5402 #:phases
5403 #~(modify-phases %standard-phases
5404 (add-after 'unpack 'relax-coverage-requirements
5405 (lambda _
5406 (substitute* "pyproject.toml"
5407 ((".*coverage.*") ""))))
5408 ;; Tests require a running Redis server.
5409 (add-before 'check 'start-redis
5410 (lambda* (#:key tests? #:allow-other-keys)
5411 (when tests?
5412 (invoke "redis-server" "--daemonize" "yes"
5413 "--enable-debug-command" "yes"
5414 "--enable-module-command" "local")))))))
5415 (native-inputs
5416 (list python-hatchling
5417 python-mock
5418 python-numpy
5419 python-pytest
5420 python-pytest-asyncio
5421 python-pytest-timeout
5422 redis))
5423 (propagated-inputs
5424 (list python-async-timeout))
5425 (home-page "https://github.com/redis/redis-py")
5426 (synopsis "Redis Python client")
5427 (description
5428 "This package provides a Python interface to the Redis key-value store.")
5429 (license license:expat)))
5430
5431(define-public python-rq
5432 (package
5433 (name "python-rq")
5434 (version "2.6.1")
5435 (source
5436 (origin
5437 (method git-fetch)
5438 (uri (git-reference
5439 (url "https://github.com/rq/rq")
5440 (commit (string-append "v" version))))
5441 (file-name (git-file-name name version))
5442 (sha256
5443 (base32 "0n2bn9awd3sbl9bkz0h7y8c356w0n7fdhifzfvzylrx2jggczv73"))))
5444 (build-system pyproject-build-system)
5445 (arguments
5446 (list
5447 ;; tests: 520 passed, 16 skipped, 76 warnings
5448 #:phases #~(modify-phases %standard-phases
5449 (add-before 'check 'start-redis
5450 (lambda _
5451 (invoke "redis-server" "--daemonize" "yes"))))))
5452 (native-inputs
5453 (list python-hatchling
5454 python-mock
5455 python-psutil
5456 python-pytest
5457 redis))
5458 (propagated-inputs
5459 (list python-click
5460 python-croniter
5461 python-redis))
5462 (home-page "https://python-rq.org/")
5463 (synopsis "Simple job queues for Python")
5464 (description
5465 "RQ (Redis Queue) is a simple Python library for queueing jobs and
5466processing them in the background with workers. It is backed by Redis and it
5467is designed to have a low barrier to entry.")
5468 (license license:bsd-2)))
5469
5470(define-public python-rq-scheduler
5471 (package
5472 (name "python-rq-scheduler")
5473 (version "0.14")
5474 (source
5475 (origin
5476 (method git-fetch)
5477 (uri (git-reference
5478 (url "https://github.com/rq/rq-scheduler")
5479 (commit (string-append "v" version))))
5480 (file-name (git-file-name name version))
5481 (sha256
5482 (base32 "09fh9m2vcl1jndq35xp1x0j8ih009r71qmhn2pkl93fykrqfavyn"))))
5483 (build-system pyproject-build-system)
5484 (arguments
5485 (list
5486 ;; tests: 60 passed, 15 deselected, 12 warnings
5487 #:test-flags
5488 #~(list #$@(map (lambda (test) (string-append "--deselect="
5489 "tests/test_scheduler.py"
5490 "::TestScheduler::"
5491 test))
5492 ;; OSError: Read crontab <...>: mcron: Only root can use
5493 ;; the -u option.
5494 (list "test_cron_sets_default_result_ttl_to_minus_1"
5495 "test_cron_sets_default_ttl_to_none"
5496 "test_cron_sets_provided_result_ttl"
5497 "test_cron_sets_provided_ttl"
5498 "test_crontab_persisted_correctly"
5499 "test_crontab_persisted_correctly_with_local_timezone"
5500 "test_crontab_rescheduled_correctly_with_local_timezone"
5501 "test_crontab_schedules_correctly"
5502 "test_crontab_sets_default_result_ttl"
5503 "test_crontab_sets_description"
5504 "test_crontab_sets_id"
5505 "test_crontab_sets_timeout"
5506 "test_job_with_crontab_get_rescheduled"))
5507 #$@(map (lambda (test) (string-append "--deselect="
5508 "tests/test_callbacks.py"
5509 "::JobCallbackTestCase::"
5510 test))
5511 ;; AssertionError: <object object at 0x7ffff7599c10> !=
5512 ;; None
5513 (list "test_job_creation_with_failure_callback"
5514 "test_job_creation_with_success_callback")))
5515 #:phases
5516 #~(modify-phases %standard-phases
5517 (add-before 'check 'start-redis
5518 (lambda _
5519 (invoke "redis-server" "--daemonize" "yes")))
5520 (add-after 'unpack 'loosen-requirements
5521 (lambda _
5522 ;; crontab package is python_crontab in PyPI.
5523 (substitute* "setup.py"
5524 (("crontab>=[0-9.]*")
5525 "python-crontab")))))))
5526 (native-inputs
5527 (list python-pytest
5528 python-setuptools
5529 redis))
5530 (propagated-inputs
5531 (list python-crontab
5532 python-freezegun
5533 python-dateutil
5534 python-rq))
5535 (home-page "https://github.com/rq/rq-scheduler")
5536 (synopsis "Job scheduling capabilities for RQ (Redis Queue)")
5537 (description
5538 "This package provides job scheduling capabilities to @code{python-rq}
5539(Redis Queue).")
5540 (license license:expat)))
5541
5542(define-public python-sqlmodel
5543 (package
5544 (name "python-sqlmodel")
5545 (version "0.0.37")
5546 (source
5547 (origin
5548 (method git-fetch)
5549 (uri (git-reference
5550 (url "https://github.com/fastapi/sqlmodel")
5551 (commit version)))
5552 (file-name (git-file-name name version))
5553 (sha256
5554 (base32 "1kb81a1ffvsvkvi9msblv3sq0s74ww340dxz3rymh5snnxc1pg92"))))
5555 (build-system pyproject-build-system)
5556 (arguments
5557 (list
5558 #:test-flags
5559 ;; Ignore optional tests.
5560 #~(list "--ignore=docs_src"
5561 "--ignore=tests/test_tutorial"
5562 ;; Unclear why this test fails.
5563 "-k" "not test_select_gen")))
5564 (propagated-inputs
5565 (list python-pydantic
5566 python-sqlalchemy-2
5567 python-typing-extensions))
5568 (native-inputs
5569 (list python-dirty-equals
5570 python-pdm-backend
5571 python-pytest))
5572 (home-page "https://github.com/fastapi/sqlmodel")
5573 (synopsis "SQLModel, SQL databases in Python, designed")
5574 (description
5575 "SQLModel is a library for interacting with SQL databases from
5576Python code, with Python objects. It is based on Python type
5577annotations, and powered by Pydantic and SQLAlchemy.")
5578 (license license:expat)))
5579
5580(define-public python-sqlparse
5581 (package
5582 (name "python-sqlparse")
5583 (version "0.5.5")
5584 (source
5585 (origin
5586 (method url-fetch)
5587 (uri (pypi-uri "sqlparse" version))
5588 (sha256
5589 (base32 "13pj7ylwm8w35nd8hz64grx5sk69qxk01lqh7gvgv1c51fdll3g2"))))
5590 (build-system pyproject-build-system)
5591 (native-inputs
5592 (list python-pytest
5593 python-hatchling))
5594 (home-page "https://github.com/andialbrecht/sqlparse")
5595 (synopsis "Non-validating SQL parser")
5596 (description "Sqlparse is a non-validating SQL parser for Python. It
5597provides support for parsing, splitting and formatting SQL statements.")
5598 (license license:bsd-3)
5599 (properties '((cpe-name . "sqlparse")))))
5600
5601(define-public python-sql
5602 (package
5603 (name "python-sql")
5604 (version "1.7.0")
5605 (source
5606 (origin
5607 (method url-fetch)
5608 (uri (pypi-uri "python_sql" version))
5609 (sha256
5610 (base32 "09niqspjmsn9wyqadgqjcrsxxa7w4r6dcp21xhi1mimr4ya0p5ky"))))
5611 (build-system pyproject-build-system)
5612 (native-inputs (list python-pytest python-setuptools))
5613 (home-page "https://python-sql.tryton.org/")
5614 (synopsis "Library to write SQL queries in a pythonic way")
5615 (description "@code{python-sql} is a library to write SQL queries, that
5616transforms idiomatic python function calls to well-formed SQL queries.")
5617 (license license:bsd-3)))
5618
5619(define-public python-pypika
5620 (package
5621 (name "python-pypika")
5622 (version "0.49.0")
5623 (source
5624 (origin
5625 (method git-fetch)
5626 (uri (git-reference
5627 (url "https://github.com/kayak/pypika")
5628 (commit (string-append "v" version))))
5629 (file-name (git-file-name name version))
5630 (sha256
5631 (base32 "0nxm2cxq9sx43g57qxw7kzy8lsl5svq659r3mhxpa9vcbxrjrb1d"))))
5632 (build-system pyproject-build-system)
5633 (native-inputs
5634 (list python-parameterized
5635 python-pytest
5636 python-setuptools))
5637 (home-page "https://github.com/kayak/pypika")
5638 (synopsis "SQL query builder API for Python")
5639 (description
5640 "PyPika is a python SQL query builder that exposes the full richness of
5641the SQL language using a syntax that reflects the resulting query.")
5642 (license license:asl2.0)))
5643
5644(define-public apache-orc
5645 (package
5646 (name "apache-orc")
5647 (version "2.0.0")
5648 (source
5649 (origin
5650 (method git-fetch)
5651 (uri (git-reference
5652 (url "https://github.com/apache/orc")
5653 (commit (string-append "v" version))))
5654 (file-name (git-file-name name version))
5655 (sha256
5656 (base32
5657 "1fi6d045wakks0x8clplyxgal342kljqjql7vq5gbd6a2qnaz6m2"))))
5658 (build-system cmake-build-system)
5659 (arguments
5660 (list
5661 ;; XXX: Some tests fail on i686, run on 64bit only for now.
5662 #:tests? (target-64bit?)
5663 #:build-type "Release"
5664 #:configure-flags
5665 #~(list "-DBUILD_JAVA=OFF"
5666 "-DINSTALL_VENDORED_LIBS=OFF"
5667 "-DCMAKE_CXX_FLAGS=-fPIC"
5668 (string-append "-DGTEST_HOME=" #$(this-package-native-input "googletest"))
5669 (string-append "-DZSTD_HOME=" (assoc-ref %build-inputs "zstd:lib"))
5670 (string-append "-DZLIB_HOME=" #$(this-package-input "zlib"))
5671 (string-append "-DPROTOBUF_HOME=" #$(this-package-input "protobuf"))
5672 (string-append "-DLZ4_HOME=" #$(this-package-input "lz4"))
5673 (string-append "-DSNAPPY_HOME=" #$(this-package-input "snappy")))
5674 #:phases
5675 #~(modify-phases %standard-phases
5676 (add-after 'unpack 'disable-bad-test
5677 (lambda _
5678 ;; This one test fails with an obscure error:
5679 ;;
5680 ;; Expected: (std::string::npos) != (error.find(error_msg)),
5681 ;; actual: 18446744073709551615 vs 18446744073709551615
5682 (substitute* "tools/test/TestFileScan.cc"
5683 (("findProgram\\(\"tools/src/orc-scan\"\\);" m)
5684 (string-append m "return;")))))
5685 (add-after 'unpack 'do-not-download-orc-format
5686 (lambda _
5687 (substitute* "cmake_modules/ThirdpartyToolchain.cmake"
5688 (("URL \"https://archive.apache.org/dist/orc/orc-format.*")
5689 (string-append "URL \"file://"
5690 #$(this-package-native-input "orc-format")
5691 "\"\n")))))
5692 (add-after 'unpack 'timezone-fallback
5693 (lambda _
5694 ;; In the build container we don't have /etc/localtime
5695 (substitute* "c++/src/Timezone.cc"
5696 (("return getTimezoneByFilename\\(LOCAL_TIMEZONE\\);")
5697 "if (!std::filesystem::exists(std::filesystem::path(LOCAL_TIMEZONE))) {
5698 return getTimezoneByName(\"UTC\");
5699}
5700return getTimezoneByFilename(LOCAL_TIMEZONE);"))))
5701 (add-before 'check 'pre-check
5702 (lambda* (#:key inputs #:allow-other-keys)
5703 (setenv "TZDIR" (search-input-directory inputs
5704 "share/zoneinfo")))))))
5705 (inputs
5706 `(("lz4" ,lz4)
5707 ("protobuf" ,protobuf)
5708 ("snappy" ,snappy)
5709 ("zlib" ,zlib "static")
5710 ("zstd" ,zstd)
5711 ("zstd:lib" ,zstd "lib")))
5712 (native-inputs
5713 `(("googletest" ,googletest)
5714 ("orc-format" ,(origin
5715 (method url-fetch)
5716 (uri "https://archive.apache.org/dist/orc/orc-format-1.0.0/\
5717orc-format-1.0.0.tar.gz")
5718 (sha256
5719 (base32
5720 "1mccbna3mqhhlqs4pw0fa4pgjnq4c41jhxrh84mq27sbz5gsx7vk"))))
5721 ("pkg-config" ,pkg-config)
5722 ("tzdata" ,tzdata-for-tests)))
5723 (home-page "https://orc.apache.org/")
5724 (synopsis "Columnar storage for Hadoop workloads")
5725 (description "ORC is a self-describing type-aware columnar file format
5726designed for Hadoop workloads. It is optimized for large streaming reads, but
5727with integrated support for finding required rows quickly.")
5728 (license license:asl2.0)))
5729
5730;; There are many wrappers for this in other languages. When touching, please
5731;; be sure to ensure all dependencies continue to build.
5732(define-public apache-arrow
5733 (package
5734 (name "apache-arrow")
5735 (version "24.0.0")
5736 (source
5737 (origin
5738 (method git-fetch)
5739 (uri (git-reference
5740 (url "https://github.com/apache/arrow")
5741 (commit (string-append "apache-arrow-" version))))
5742 (file-name (git-file-name name version))
5743 (sha256
5744 (base32
5745 "1j3gs5ffa9gx2y2nggmi2zn5rj0bsnjnxrzfnipx6050jz6n8dx9"))))
5746 (build-system cmake-build-system)
5747 (arguments
5748 (list
5749 #:tests? #f
5750 #:phases
5751 #~(modify-phases %standard-phases
5752 (add-before 'configure 'enter-source-directory
5753 (lambda _ (chdir "cpp")))
5754 (add-after 'unpack 'set-env
5755 (lambda* (#:key inputs #:allow-other-keys)
5756 (substitute* "cpp/cmake_modules/ThirdpartyToolchain.cmake"
5757 (("set\\(xsimd_SOURCE.*") ""))
5758 (setenv "BOOST_ROOT" #$(this-package-input "boost"))
5759 (setenv "BROTLI_HOME" #$(this-package-input "brotli"))
5760 (setenv "FLATBUFFERS_HOME" #$(this-package-input "flatbuffers"))
5761 (setenv "RAPIDJSON_HOME" #$(this-package-input "rapidjson")))))
5762 #:build-type "Release"
5763 #:configure-flags
5764 #~(list "-DARROW_PYTHON=ON"
5765 ;; Parquet options
5766 "-DARROW_PARQUET=ON"
5767 "-DPARQUET_BUILD_EXECUTABLES=ON"
5768 ;; The maintainers disallow using system versions of
5769 ;; jemalloc:
5770 ;; https://issues.apache.org/jira/browse/ARROW-3507. This
5771 ;; is unfortunate because jemalloc increases performance:
5772 ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/.
5773 "-DARROW_JEMALLOC=OFF"
5774 ;; System mimalloc is not suported and must be bundled:
5775 ;; https://github.com/apache/arrow/issues/42211.
5776 "-DARROW_MIMALLOC=OFF"
5777
5778 ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global
5779 ;; option that instructs the build system how to resolve
5780 ;; each dependency. SYSTEM = Finding the dependency in
5781 ;; system paths using CMake's built-in find_package
5782 ;; function, or using pkg-config for packages that do not
5783 ;; have this feature
5784 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
5785 "-Dxsimd_SOURCE=SYSTEM"
5786
5787 "-DARROW_RUNTIME_SIMD_LEVEL=NONE"
5788 "-DARROW_SIMD_LEVEL=NONE"
5789 "-DARROW_PACKAGE_KIND=Guix"
5790
5791 ;; Split output into its component packages.
5792 (string-append "-DCMAKE_INSTALL_PREFIX=" #$output:lib)
5793 (string-append "-DCMAKE_INSTALL_RPATH=" #$output:lib "/lib")
5794 (string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin")
5795 (string-append "-DCMAKE_INSTALL_INCLUDEDIR=" #$output:include
5796 "/share/include")
5797
5798 "-DARROW_WITH_SNAPPY=ON"
5799 "-DARROW_WITH_ZLIB=ON"
5800 "-DARROW_WITH_ZSTD=ON"
5801 "-DARROW_WITH_LZ4=ON"
5802 "-DARROW_COMPUTE=ON"
5803 "-DARROW_CSV=ON"
5804 "-DARROW_DATASET=ON"
5805 "-DARROW_FILESYSTEM=ON"
5806 "-DARROW_HDFS=ON"
5807 "-DARROW_JSON=ON"
5808 ;; Arrow Python C++ integration library (required for
5809 ;; building pyarrow). This library must be built against
5810 ;; the same Python version for which you are building
5811 ;; pyarrow. NumPy must also be installed. Enabling this
5812 ;; option also enables ARROW_COMPUTE, ARROW_CSV,
5813 ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and
5814 ;; ARROW_JSON.
5815 "-DARROW_PYTHON=ON"
5816 "-DARROW_ORC=ON"
5817 "-DORC_SOURCE=SYSTEM"
5818
5819 ;; Building the tests forces on all the
5820 ;; optional features and the use of static
5821 ;; libraries.
5822 "-DARROW_BUILD_TESTS=OFF"
5823 ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
5824 "-DARROW_BUILD_STATIC=OFF")))
5825 (inputs
5826 (list apache-orc
5827 boost
5828 brotli
5829 bzip2
5830 double-conversion
5831 gflags
5832 glog
5833 grpc
5834 protobuf
5835 python
5836 python-numpy
5837 rapidjson
5838 re2
5839 snappy
5840 xsimd))
5841 ;; These are all listed under Requires.private in arrow.pc
5842 (propagated-inputs
5843 (list `(,apache-thrift "lib") lz4 utf8proc zlib
5844 `(,zstd "lib")))
5845 (native-inputs
5846 (list pkg-config))
5847 (outputs '("out" "lib" "include"))
5848 (home-page "https://arrow.apache.org/")
5849 (synopsis "Columnar in-memory analytics")
5850 (description "Apache Arrow is a columnar in-memory analytics layer
5851designed to accelerate big data. It houses a set of canonical in-memory
5852representations of flat and hierarchical data along with multiple
5853language-bindings for structure manipulation. It also provides IPC and common
5854algorithm implementations.")
5855 (license license:asl2.0)))
5856
5857(define-public python-pyarrow
5858 (package
5859 (inherit apache-arrow)
5860 (name "python-pyarrow")
5861 (build-system pyproject-build-system)
5862 (arguments
5863 (list
5864 ;; XXX: Test data is distributed separately in
5865 ;; <https://github.com/apache/arrow-testing> 39MiB and requires
5866 ;; additional steps to be implemented, see
5867 ;; <https://github.com/apache/arrow/blob/main/ci/scripts/python_build.sh>.
5868 #:tests? #f
5869 #:phases
5870 #~(modify-phases %standard-phases
5871 (add-after 'unpack 'enter-source-directory
5872 (lambda _ (chdir "python")))
5873 (add-before 'install 'set-pyarrow-build-options
5874 (lambda _
5875 (setenv "PYARROW_BUNDLE_ARROW_CPP_HEADERS" "0")
5876 (setenv "PYARROW_CMAKE_OPTIONS"
5877 (string-append "-DCMAKE_INSTALL_RPATH=" #$output))
5878 (setenv "PYARROW_PARALLEL"
5879 ;; XXX: It's a build host specific option and needs to
5880 ;; be tunable.
5881 (number->string (parallel-job-count)))
5882 (setenv "PYARROW_WITH_DATASET" "1")
5883 (setenv "PYARROW_WITH_HDFS" "1")
5884 (setenv "PYARROW_WITH_ORC" "1")
5885 (setenv "PYARROW_WITH_PARQUET" "1"))))))
5886 (propagated-inputs
5887 (list (list apache-arrow "lib")
5888 (list apache-arrow "include")
5889 apache-orc
5890 python-numpy
5891 python-pandas))
5892 (native-inputs
5893 (list pkg-config
5894 python-cython
5895 python-pytest
5896 python-scikit-build-core
5897 python-setuptools-scm
5898 python-setuptools))
5899 (outputs '("out"))
5900 (home-page "https://arrow.apache.org/docs/python/")
5901 (synopsis "Python bindings for Apache Arrow")
5902 (description
5903 "This library provides a Pythonic API wrapper for the reference Arrow C++
5904implementation, along with tools for interoperability with pandas, NumPy, and
5905other traditional Python scientific computing packages.")
5906 (license license:asl2.0)))
5907
5908(define-public python-fastparquet
5909 (package
5910 (name "python-fastparquet")
5911 (version "2026.5.0")
5912 (source
5913 (origin
5914 (method git-fetch)
5915 (uri (git-reference
5916 (url "https://github.com/dask/fastparquet")
5917 (commit version)))
5918 (file-name (git-file-name name version))
5919 (sha256
5920 (base32 "1x7c25pqrishmskc2k56yh15af4fmsqj4gwxf33d26p2flqyh6xn"))))
5921 (build-system pyproject-build-system)
5922 (arguments
5923 (list
5924 ;; tests: 362 passed, 123 skipped, 15 xfailed, 6 xpassed, 2 warnings
5925 #:test-flags
5926 #~(list "--numprocesses" (number->string (parallel-job-count)))
5927 #:phases
5928 #~(modify-phases %standard-phases
5929 (add-after 'unpack 'remove-dependencies-on-git
5930 (lambda _
5931 (substitute* "setup.py"
5932 (("^.*\"git\", \"status\".*$") ""))))
5933 (add-before 'check 'remove-local-source
5934 (lambda _
5935 (copy-recursively "fastparquet/test" "test")
5936 (delete-file-recursively "fastparquet"))))))
5937 (native-inputs
5938 (list python-cython
5939 python-pytest
5940 python-pytest-xdist
5941 python-setuptools
5942 python-setuptools-scm
5943 tzdata-for-tests))
5944 (propagated-inputs
5945 (list python-cramjam
5946 python-fsspec
5947 python-numpy
5948 python-packaging
5949 python-pandas))
5950 (home-page "https://github.com/dask/fastparquet")
5951 (synopsis "Python implementation of the Parquet file format")
5952 (description
5953 "@code{fastparquet} is a Python implementation of the Parquet file
5954format. @code{fastparquet} is used implicitly by @code{dask}, @code{pandas}
5955and @code{intake-parquet}. It supports the following compression algorithms:
5956
5957@itemize
5958@item Gzip
5959@item Snappy
5960@item Brotli
5961@item LZ4
5962@item Zstd
5963@item LZO (optionally)
5964@end itemize")
5965 (license license:asl2.0)))
5966
5967(define-public python-crate
5968 (package
5969 (name "python-crate")
5970 (version "2.2.1")
5971 (source
5972 (origin
5973 (method git-fetch)
5974 (uri (git-reference
5975 (url "https://github.com/crate/crate-python")
5976 (commit version)))
5977 (file-name (git-file-name name version))
5978 (sha256
5979 (base32 "05yiigpd8kfrms4d369gmp3xiv16l4ajr664rhv0fzc7yy6qv7i7"))))
5980 (build-system pyproject-build-system)
5981 (arguments
5982 (list
5983 ;; tests: 107 passed, 8 deselected
5984 #:test-flags
5985 #~(list "--deselect=tests/test_docs.py::test_docs"
5986 #$@(map (lambda (test) (string-append "--deselect=tests/"
5987 "testing/test_layer.py"
5988 "::LayerTest"
5989 test))
5990 (list "::test_additional_settings"
5991 "::test_basic"
5992 "::test_cluster"
5993 "::test_default_settings"
5994 "::test_dynamic_http_port"
5995 "::test_environment_variables"
5996 "::test_verbosity")))
5997 #:phases
5998 #~(modify-phases %standard-phases
5999 (add-after 'unpack 'set-version
6000 ;; versioningit needs git tags; patch pyproject.toml to use static
6001 ;; version and create _version.py directly.
6002 (lambda _
6003 (substitute* "pyproject.toml"
6004 (("source = \"versioningit\"")
6005 "
6006path = \"src/crate/_version.py\"")
6007 ((", \"versioningit\"")
6008 ""))
6009 (call-with-output-file "src/crate/_version.py"
6010 (lambda (port)
6011 (format port "__version__ = \"~a\"~%" #$version))))))))
6012 (native-inputs
6013 (list python-hatchling
6014 python-pytest
6015 python-pytz
6016 tzdata-for-tests))
6017 (propagated-inputs
6018 (list python-orjson
6019 python-urllib3
6020 python-verlib2))
6021 (home-page "https://github.com/crate/crate-python")
6022 (synopsis "CrateDB Python client")
6023 (description
6024 "This package provides a Python client library for CrateDB.
6025It implements the Python DB API 2.0 specification and includes support for
6026SQLAlchemy.")
6027 (license license:asl2.0)))
6028
6029(define-public libdbi
6030 (package
6031 (name "libdbi")
6032 (version "0.9.0")
6033 (source (origin
6034 (method url-fetch)
6035 (uri (string-append "mirror://sourceforge/libdbi/libdbi/libdbi-"
6036 version "/libdbi-" version ".tar.gz"))
6037 (sha256
6038 (base32
6039 "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"))))
6040 (build-system gnu-build-system)
6041 (synopsis "Database independent abstraction layer in C")
6042 (description
6043 "This library implements a database independent abstraction layer in C,
6044similar to the DBI/DBD layer in Perl. Writing one generic set of code,
6045programmers can leverage the power of multiple databases and multiple
6046simultaneous database connections by using this framework.")
6047 (home-page "https://libdbi.sourceforge.net/")
6048 (license license:lgpl2.1+)))
6049
6050(define-public libdbi-drivers
6051 (package
6052 (name "libdbi-drivers")
6053 (version "0.9.0")
6054 (source (origin
6055 (method url-fetch)
6056 (uri (string-append "mirror://sourceforge/libdbi-drivers/"
6057 "libdbi-drivers/libdbi-drivers-" version
6058 "/libdbi-drivers-" version ".tar.gz"))
6059 (sha256
6060 (base32
6061 "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"))))
6062 (build-system gnu-build-system)
6063 (native-inputs
6064 (list ;; For tests.
6065 inetutils
6066 (libc-utf8-locales-for-target (%current-system))
6067 mariadb))
6068 (inputs
6069 `(("libdbi" ,libdbi)
6070 ("mariadb:dev" ,mariadb "dev")
6071 ("mariadb:lib" ,mariadb "lib")
6072 ("postgresql" ,postgresql)
6073 ("sqlite" ,sqlite)))
6074 (arguments
6075 `(#:configure-flags
6076 (let ((libdbi (assoc-ref %build-inputs "libdbi"))
6077 (mysql:inc (assoc-ref %build-inputs "mariadb:dev"))
6078 (mysql:lib (assoc-ref %build-inputs "mariadb:lib"))
6079 (postgresql (assoc-ref %build-inputs "postgresql"))
6080 (sqlite (assoc-ref %build-inputs "sqlite")))
6081 (list "--disable-docs"
6082 (string-append "--with-dbi-incdir=" libdbi "/include")
6083 (string-append "--with-dbi-libdir=" libdbi "/lib")
6084 "--with-mysql"
6085 (string-append "--with-mysql-incdir=" mysql:inc "/include/mysql")
6086 (string-append "--with-mysql-libdir=" mysql:lib "/lib")
6087 "--with-pgsql"
6088 (string-append "--with-pgsql-incdir=" postgresql "/include")
6089 (string-append "--with-pgsql-libdir=" postgresql "/lib")
6090 "--with-sqlite3"
6091 (string-append "--with-sqlite-incdir=" sqlite "/include")
6092 (string-append "--with-sqlite-libdir=" sqlite "/lib")))
6093 #:tests? #f ; FIXME: Find why the tests get stuck forever.
6094 #:phases
6095 (modify-phases %standard-phases
6096 (add-after 'unpack 'gcc14
6097 (lambda _
6098 (setenv "CFLAGS"
6099 (string-append
6100 "-g -O2 "
6101 "-Wno-error=int-conversion "
6102 "-Wno-error=incompatible-pointer-types "
6103 "-Wno-error=implicit-function-declaration"))))
6104
6105 (add-after 'unpack 'fix-tests
6106 (lambda* (#:key inputs #:allow-other-keys)
6107 (substitute* "tests/test_mysql.sh"
6108 (("^MYMYSQLD=.*")
6109 (string-append "MYMYSQLD="
6110 (assoc-ref inputs "mariadb")
6111 "/bin/mysqld")))
6112 #t))
6113 (add-after 'install 'remove-empty-directories
6114 (lambda* (#:key outputs #:allow-other-keys)
6115 (let ((var (string-append (assoc-ref outputs "out") "/var")))
6116 (delete-file-recursively var))
6117 #t)))))
6118 (synopsis "Database drivers for the libdbi framework")
6119 (description
6120 "The @code{libdbi-drivers} library provides the database specific drivers
6121for the @code{libdbi} framework.
6122
6123The drivers officially supported by @code{libdbi} are:
6124@itemize
6125@item MySQL,
6126@item PostgreSQL,
6127@item SQLite.
6128@end itemize")
6129 (home-page "https://libdbi-drivers.sourceforge.net/")
6130 (license license:lgpl2.1+)))
6131
6132(define-public soci
6133 (package
6134 (name "soci")
6135 (version "4.0.3")
6136 (source (origin
6137 (method git-fetch)
6138 (uri (git-reference
6139 (url "https://github.com/SOCI/soci/")
6140 (commit (string-append "v" version))))
6141 (file-name (git-file-name name version))
6142 (sha256
6143 (base32
6144 "12aq7pama96l2c1kmfkclb4bvrsxs9a8ppgk5gmzw45w2lg35i0y"))
6145 (patches (search-patches "soci-mysql-ddl-types.patch"))))
6146 (build-system cmake-build-system)
6147 (propagated-inputs
6148 ;; Headers of soci has include-references to headers of these inputs.
6149 (list firebird
6150 postgresql
6151 sqlite
6152 unixodbc
6153 boost
6154 `(,mariadb "dev")))
6155 (arguments
6156 (list #:configure-flags
6157 ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs
6158 ;; it.
6159 #~(list "-DCMAKE_CXX_STANDARD=17"
6160 "-DSOCI_LIBDIR=lib"
6161 ;; This is for relocation when linking statically
6162 "-DCMAKE_CXX_FLAGS=-fPIE")
6163 #:tests? #f)) ; may require running database management systems
6164 (synopsis "C++ Database Access Library")
6165 (description
6166 "SOCI is an abstraction layer for several database backends, including
6167PostreSQL, SQLite, ODBC and MySQL.")
6168 (home-page "https://soci.sourceforge.net/")
6169 (license license:boost1.0)))
6170
6171(define-public freetds
6172 (package
6173 (name "freetds")
6174 (version "1.2.20")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (string-append "https://www.freetds.org/files/stable/"
6179 "freetds-" version ".tar.gz"))
6180 (sha256
6181 (base32 "11fzwcahc1bc8npxbif0448v9cwyf7k04167i7fcspmfw7a0hj0d"))))
6182 (build-system gnu-build-system)
6183 (inputs (list unixodbc))
6184 (arguments
6185 ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection,
6186 ;; disabled for now.
6187 `(#:tests? #f
6188 #:configure-flags
6189 (list (string-append "--with-unixodbc=" (assoc-ref %build-inputs "unixodbc")))))
6190 (home-page "https://www.freetds.org/")
6191 (synopsis "Client libraries for MS SQL and Sybase servers")
6192 (description
6193 "FreeTDS is an implementation of the Tabular DataStream protocol, used for
6194connecting to MS SQL and Sybase servers over TCP/IP.")
6195 (license license:lgpl2.0+)))
6196
6197(define-public python-tinydb
6198 (package
6199 (name "python-tinydb")
6200 (version "4.8.0")
6201 (source (origin
6202 (method url-fetch)
6203 (uri (pypi-uri "tinydb" version))
6204 (sha256
6205 (base32 "0r6mavw0wm03lbmqbgglsyff3vws86ddg3q8h29glpd7qnlqdmkd"))))
6206 (build-system pyproject-build-system)
6207 (native-inputs
6208 (list python-poetry-core python-pytest))
6209 (home-page "https://github.com/msiemens/tinydb")
6210 (synopsis "TinyDB is a lightweight document oriented database")
6211 (description
6212 "TinyDB is a small document oriented database written in pure Python
6213with no external dependencies. The targets are small apps that would
6214be blown away by a SQL-DB or an external database server.")
6215 (license license:expat)))
6216
6217(define-public sdb
6218 (package
6219 (name "sdb")
6220 (version "2.5.2")
6221 (source (origin
6222 (method git-fetch)
6223 (uri (git-reference
6224 (url "https://github.com/radareorg/sdb.git")
6225 (commit version)))
6226 (file-name (git-file-name name version))
6227 (sha256
6228 (base32
6229 "19305r481nfhyy6pixgxhpw0wsv5s4h42z7pdvgdyhbcbimnm5x9"))))
6230 (build-system meson-build-system)
6231 (arguments
6232 (list
6233 #:phases
6234 #~(modify-phases %standard-phases
6235 (add-before 'check 'setenv-cc
6236 (lambda _
6237 (setenv "CC" #$(cc-for-target))))
6238 ;; The provided meson.build uses a Makefile in the source root
6239 ;; to run the tests, but resolves its directory relative to
6240 ;; the build directory, assuming the build is one level under
6241 ;; the source tree. This breaks if the build tree is elsewhere.
6242 (add-before 'check 'set-test-workdir-to-source-root
6243 (lambda _
6244 (substitute* "../source/meson.build"
6245 (("workdir: join_paths.*$")
6246 "workdir: meson.project_source_root(),\n")))))))
6247 (native-inputs
6248 (list node
6249 perl
6250 python-minimal-wrapper))
6251 (home-page "https://github.com/radareorg/sdb")
6252 (synopsis "Simple and fast string based key-value database")
6253 (description "SDB is a simple key/value database based on djb's cdb disk
6254storage that supports JSON and array introspection.")
6255 (license license:expat)))
6256
6257(define-public sqlitebrowser
6258 (package
6259 (name "sqlitebrowser")
6260 (version "3.13.1")
6261 (source
6262 (origin
6263 (method git-fetch)
6264 (uri (git-reference
6265 (url "https://github.com/sqlitebrowser/sqlitebrowser")
6266 (commit (string-append "v" version))))
6267 (file-name (git-file-name name version))
6268 (sha256
6269 (base32 "0615yks1krwjw4l1xxahn9j6qbd7cs8dxza7kc73hc5wr0xng5kf"))
6270 (modules '((guix build utils)))
6271 (snippet
6272 '(begin
6273 ;; Delete bundled dependencies, available as Guix packages.
6274 (for-each delete-file-recursively
6275 (list "libs/json"
6276 "libs/qcustomplot-source"
6277 "libs/qhexedit"
6278 "libs/qscintilla"))
6279 ;; Patch #includes to be able to use Guix's nlohmann-json
6280 (with-directory-excursion "src"
6281 (substitute* (list "RemoteCommitsModel.h"
6282 "RemoteLocalFilesModel.h"
6283 "RemoteModel.h"
6284 "RemotePushDialog.cpp"
6285 "RemoteNetwork.cpp"
6286 "RemoteDock.cpp"
6287 "ExportDataDialog.cpp"
6288 "EditDialog.cpp")
6289 (("json\\.hpp") "nlohmann/json.hpp")))))))
6290 (build-system qt-build-system)
6291 (arguments
6292 (list #:configure-flags
6293 #~(list (string-append "-DQSCINTILLA_INCLUDE_DIR="
6294 #$(this-package-input "qscintilla-qt5")
6295 "/include/Qsci")
6296 "-DFORCE_INTERNAL_QCUSTOMPLOT=OFF"
6297 "-DFORCE_INTERNAL_QHEXEDIT=OFF"
6298 "-DENABLE_TESTING=ON")))
6299 (inputs
6300 (list qcustomplot-qt5
6301 qhexedit
6302 qscintilla-qt5
6303 qtbase-5
6304 qtwayland-5
6305 sqlite))
6306 (native-inputs (list nlohmann-json qttools-5))
6307 (home-page "https://sqlitebrowser.org/")
6308 (synopsis "Visual database browser and editor for SQLite")
6309 (description "Sqlitebrowser lets you create, design, and edit database files
6310compatible with SQLite using a graphical user interface.")
6311 (license
6312 ;; dual license
6313 (list license:gpl3+
6314 license:mpl2.0))))
6315
6316(define-public sqlitecpp
6317 (package
6318 (name "sqlitecpp")
6319 (version "3.3.3")
6320 (source
6321 (origin
6322 (method git-fetch)
6323 (uri (git-reference
6324 (url "https://github.com/SRombauts/SQLiteCpp")
6325 (commit version)))
6326 (file-name (git-file-name name version))
6327 (sha256
6328 (base32
6329 "10gliycmzd16ydbpwwsn1r6byf5l78fwwc7hzgjdgg68zcclj8s5"))
6330 (modules '((guix build utils)))
6331 (snippet #~(delete-file-recursively "sqlite3"))))
6332 (build-system cmake-build-system)
6333 (arguments
6334 (list
6335 #:configure-flags #~'("-DSQLITECPP_INTERNAL_SQLITE=OFF"
6336 "-DSQLITECPP_INCLUDE_SCRIPT=OFF"
6337 "-DSQLITECPP_BUILD_TESTS=ON"
6338 "-DBUILD_SHARED_LIBS=ON")))
6339 (inputs (list sqlite))
6340 (native-inputs (list googletest))
6341 (home-page "https://srombauts.github.io/SQLiteCpp/")
6342 (synopsis "C++ SQLite3 wrapper")
6343 (description "SQLiteC++ offers a intuitive C++ wrapper around the native C
6344APIs of SQLite, prioritizing speed, minimal dependencies, and portability.")
6345 ;; Complementary cmake and code-linter 3-clause BSD.
6346 (license license:expat)))
6347
6348(define-public sqlitestudio
6349 (package
6350 (name "sqlitestudio")
6351 (version "3.4.19")
6352 (source
6353 (origin
6354 (method git-fetch)
6355 (uri (git-reference
6356 (url "https://github.com/pawelsalawa/sqlitestudio")
6357 (commit version)))
6358 (file-name (git-file-name name version))
6359 (sha256
6360 (base32 "1fvyd2l1pbpl4jgn7vp8j2gsmw0sbfzidyv3k87xm6a2d7i680yc"))))
6361 (build-system gnu-build-system)
6362 (arguments
6363 (list
6364 #:phases
6365 #~(modify-phases %standard-phases
6366 (replace 'configure
6367 (lambda* (#:key inputs outputs #:allow-other-keys)
6368 (let* ((out (assoc-ref outputs "out"))
6369 (python-version #$(version-major+minor (package-version
6370 python)))
6371 (python-include (string-append (assoc-ref inputs "python")
6372 "/include/python"
6373 python-version)))
6374 (invoke "qmake"
6375 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out
6376 "/lib:")
6377 (string-append "PREFIX=" out) "./SQLiteStudio3")
6378 (mkdir-p "Plugins")
6379 (with-directory-excursion "Plugins"
6380 (invoke "qmake"
6381 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out
6382 "/lib:")
6383 (string-append "PREFIX=" out)
6384 (string-append "INCLUDEPATH+=" python-include)
6385 (string-append "PYTHON_VERSION=" python-version)
6386 ".")))))
6387 (replace 'build
6388 (lambda _
6389 (invoke "make" "-j"
6390 (number->string (parallel-job-count)))
6391 (with-directory-excursion "Plugins"
6392 (invoke "make")))) ;building plugins in parallel corrupts them
6393 (replace 'install
6394 (lambda* (#:key outputs #:allow-other-keys)
6395 (let* ((out (assoc-ref outputs "out"))
6396 (icons-dir (string-append out "/share/icons/hicolor/"))
6397 (src-img-dir (string-append
6398 "SQLiteStudio3/guiSQLiteStudio/img/")))
6399 (invoke "make" "-j"
6400 (number->string (parallel-job-count)) "install")
6401 (for-each (lambda (size)
6402 (let ((target-dir (string-append icons-dir size
6403 "x" size "/apps/")))
6404 (mkdir-p target-dir)
6405 (copy-file (string-append src-img-dir
6406 "sqlitestudio_" size
6407 ".png")
6408 (string-append target-dir
6409 "sqlitestudio.png"))))
6410 '("16" "48" "256"))
6411 (let ((target-dir (string-append icons-dir "scalable/apps/")))
6412 (mkdir-p target-dir)
6413 (install-file (string-append src-img-dir "sqlitestudio.svg")
6414 target-dir))
6415 (with-directory-excursion "Plugins"
6416 (invoke "make" "-j"
6417 (number->string (parallel-job-count)) "install")))))
6418 (add-after 'install 'install-desktop
6419 (lambda* (#:key outputs #:allow-other-keys)
6420 (let* ((out (assoc-ref outputs "out")))
6421 (make-desktop-entry-file (string-append out
6422 "/share/applications/"
6423 #$name ".desktop")
6424 #:name "SQLiteStudio"
6425 #:comment #$(package-synopsis
6426 this-package)
6427 #:exec (string-append #$name " %f")
6428 #:icon #$name
6429 #:categories '("Development"
6430 "Utility" "Database")
6431 #:mime-type "application/vnd.sqlite3")))))))
6432 (inputs (list openssl
6433 python
6434 qtbase-5
6435 qtsvg-5
6436 readline
6437 sqlite-next))
6438 (native-inputs (list python qttools-5 qtdeclarative-5 tcl))
6439 (home-page "https://sqlitestudio.pl/")
6440 (synopsis "Graphical user interface to browse and edit SQLite databases")
6441 (description
6442 "SQLiteStudio is desktop application for browsing and editing SQLite
6443database files. It is aimed for people, who know what SQLite is, or what
6444relational databases are in general.")
6445 (license license:gpl3+)))
6446
6447(define-public sqls
6448 (package
6449 (name "sqls")
6450 ;; TODO: The latest version requires a way more packages to be available
6451 ;; in Guix.
6452 (version "0.2.18")
6453 (source (origin
6454 (method git-fetch)
6455 (uri (git-reference
6456 (url "https://github.com/sqls-server/sqls")
6457 (commit (string-append "v" version))))
6458 (file-name (git-file-name name version))
6459 (sha256
6460 (base32
6461 "13837v27avdp2nls3vyy7ml12nj7rxragchwf92adn10ffp4aj6c"))))
6462 (build-system go-build-system)
6463 (arguments
6464 (list
6465 #:install-source? #f
6466 #:import-path "github.com/lighttiger2505/sqls"
6467 ;; XXX: Try to enable more or all tests.
6468 #:test-subdirs #~(list "ast/..."
6469 "dialect/..."
6470 "parser/..."
6471 "internal/completer"
6472 "internal/config/..."
6473 "internal/database"
6474 "internal/debug"
6475 "internal/formatter"
6476 "internal/lsp")))
6477 (native-inputs
6478 (list go-github-com-google-go-cmp
6479 go-github-com-go-sql-driver-mysql
6480 go-github-com-k0kubun-pp
6481 go-github-com-lib-pq
6482 go-github-com-mattn-go-runewidth
6483 go-github-com-mattn-go-sqlite3
6484 go-github-com-olekukonko-tablewriter-0.0.5
6485 go-github-com-pkg-errors
6486 go-github-com-sourcegraph-jsonrpc2
6487 go-golang-org-x-crypto
6488 go-golang-org-x-xerrors
6489 go-gopkg-in-yaml-v2))
6490 (home-page "https://github.com/sqls-server/sqls")
6491 (synopsis "SQL language server written in Go")
6492 (description
6493 "This package implements the @acronym{LSP, Language Server Protocol} for SQL.")
6494 (license license:expat)))
6495
6496(define-public python-dbutils
6497 (package
6498 (name "python-dbutils")
6499 (version "3.1.2")
6500 (source
6501 (origin
6502 (method git-fetch)
6503 (uri (git-reference
6504 (url "https://github.com/WebwareForPython/DBUtils")
6505 (commit
6506 (string-append "Release-"
6507 (string-join (string-split version #\.) "_")))))
6508 (file-name (git-file-name name version))
6509 (sha256
6510 (base32 "1x2bqqlp6ahm8k8d0f1g3l0fcsjala3z6jdmcwhwkbh0agg8agff"))))
6511 (build-system pyproject-build-system)
6512 (native-inputs (list python-pytest python-setuptools))
6513 (home-page "https://github.com/WebwareForPython/DBUtils")
6514 (synopsis "Database connections for multi-threaded environments")
6515 (description
6516 "This package provides tooling for solid, persistent and pooled
6517connections to a database that can be used in all kinds of multi-threaded
6518environments.")
6519 (license license:expat)))
6520
6521(define-public python-dogpile-cache
6522 (package
6523 (name "python-dogpile-cache")
6524 (version "1.3.4")
6525 (source
6526 (origin
6527 (method url-fetch)
6528 (uri (pypi-uri "dogpile_cache" version))
6529 (sha256
6530 (base32 "1h58g3iyv6gc6x3in252d4c1v5sncvishjy82dz3zpazbxbra0jg"))))
6531 (build-system pyproject-build-system)
6532 (native-inputs
6533 (list python-mako
6534 python-pytest
6535 python-setuptools
6536 python-wheel))
6537 (propagated-inputs
6538 (list python-decorator
6539 python-stevedore
6540 python-typing-extensions))
6541 (home-page "https://github.com/sqlalchemy/dogpile.cache")
6542 (synopsis "Caching front-end based on the Dogpile lock")
6543 (description "@code{dogpile.cache} is a caching API which provides a
6544generic interface to caching backends of any variety, and additionally
6545provides API hooks which integrate these cache backends with the locking
6546mechanism of @code{dogpile}.")
6547 (license license:expat)))
6548
6549(define-public datasette
6550 (package
6551 (name "datasette")
6552 (version "1.0a26")
6553 (source
6554 (origin
6555 (method git-fetch)
6556 (uri (git-reference
6557 (url "https://github.com/simonw/datasette")
6558 (commit version)))
6559 (file-name (git-file-name name version))
6560 (sha256
6561 (base32 "1ra0yfrz9w3jx7ix3dmcsg0g8hjxkz37586g7ijmqshxpzczxfm7"))))
6562 (build-system pyproject-build-system)
6563 (arguments
6564 (list
6565 ;; tests: 1720 passed, 9 skipped, 8 xfailed, 13 xpassed, 3 warnings, 120
6566 ;; subtests passed
6567 #:test-flags
6568 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
6569 "--ignore=tests/test_black.py")
6570 #:phases
6571 #~(modify-phases %standard-phases
6572 (add-after 'unpack 'relax-requirements
6573 (lambda _
6574 (substitute* "pyproject.toml"
6575 (("\"pip\",") "")))))))
6576 (propagated-inputs
6577 (list python-aiofiles
6578 python-asgi-csrf
6579 python-asgiref
6580 python-asyncinject
6581 python-click
6582 python-click-default-group
6583 python-httpx
6584 python-hupper
6585 python-itsdangerous
6586 python-janus
6587 python-jinja2
6588 python-mergedeep
6589 python-pluggy
6590 python-pyyaml
6591 python-sqlite-utils
6592 python-uvicorn))
6593 (native-inputs
6594 (list nss-certs-for-test
6595 python-beautifulsoup4
6596 python-cogapp
6597 python-multipart-form-data-conformance
6598 python-pytest
6599 python-pytest-asyncio
6600 python-pytest-timeout
6601 python-pytest-xdist
6602 python-setuptools
6603 python-trustme))
6604 (home-page "https://datasette.io/")
6605 (synopsis "Multi-tool for exploring and publishing data")
6606 (description "Datasette is a tool for exploring and publishing data.
6607It helps people take data of any shape or size and publish that as an
6608interactive, explorable website and accompanying API.")
6609 (license license:asl2.0)))