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