| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 |
|
| 30 | (define-module (gnu packages sqlite)
|
| 31 | #:use-module (gnu packages)
|
| 32 | #:use-module (gnu packages readline)
|
| 33 | #:use-module ((guix licenses) #:prefix license:)
|
| 34 | #:use-module (guix packages)
|
| 35 | #:use-module (guix download)
|
| 36 | #:use-module (guix build-system gnu)
|
| 37 | #:use-module (guix utils)
|
| 38 | #:use-module (ice-9 match)
|
| 39 | #:use-module (srfi srfi-26))
|
| 40 |
|
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 |
|
| 46 | (define-public sqlite
|
| 47 | (package
|
| 48 | (name "sqlite")
|
| 49 | (version "3.28.0")
|
| 50 | (source (origin
|
| 51 | (method url-fetch)
|
| 52 | (uri (let ((numeric-version
|
| 53 | (match (string-split version #\.)
|
| 54 | ((first-digit other-digits ...)
|
| 55 | (string-append first-digit
|
| 56 | (string-pad-right
|
| 57 | (string-concatenate
|
| 58 | (map (cut string-pad <> 2 #\0)
|
| 59 | other-digits))
|
| 60 | 6 #\0))))))
|
| 61 | (string-append "https://sqlite.org/2019/sqlite-autoconf-"
|
| 62 | numeric-version ".tar.gz")))
|
| 63 | (sha256
|
| 64 | (base32
|
| 65 | "1hxpi45crbqp6lacl7z611lna02k956m9bsy2bjzrbb2y23546yn"))))
|
| 66 | (build-system gnu-build-system)
|
| 67 | (inputs `(("readline" ,readline)))
|
| 68 | (arguments
|
| 69 | `(#:configure-flags
|
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
|
| 75 | "-DSQLITE_ENABLE_FTS3 "
|
| 76 | "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
|
| 77 | "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
|
| 78 | (home-page "https://www.sqlite.org/")
|
| 79 | (synopsis "The SQLite database management system")
|
| 80 | (description
|
| 81 | "SQLite is a software library that implements a self-contained, serverless,
|
| 82 | zero-configuration, transactional SQL database engine. SQLite is the most
|
| 83 | widely deployed SQL database engine in the world. The source code for SQLite
|
| 84 | is in the public domain.")
|
| 85 | (license license:public-domain)))
|
| 86 |
|
| 87 | |
| 88 | (define-public sqlite-with-column-metadata
|
| 89 | (package/inherit sqlite
|
| 90 | (name "sqlite-with-column-metadata")
|
| 91 | (arguments
|
| 92 | (substitute-keyword-arguments (package-arguments sqlite)
|
| 93 | ((#:configure-flags flags)
|
| 94 | `(list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
|
| 95 | "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
|
| 96 | "-DSQLITE_ENABLE_DBSTAT_VTAB "
|
| 97 | "-DSQLITE_ENABLE_COLUMN_METADATA")))))))
|