| 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 | (replacement sqlite-3.26.0)
|
| 50 | (version "3.24.0")
|
| 51 | (source (origin
|
| 52 | (method url-fetch)
|
| 53 | (uri (let ((numeric-version
|
| 54 | (match (string-split version #\.)
|
| 55 | ((first-digit other-digits ...)
|
| 56 | (string-append first-digit
|
| 57 | (string-pad-right
|
| 58 | (string-concatenate
|
| 59 | (map (cut string-pad <> 2 #\0)
|
| 60 | other-digits))
|
| 61 | 6 #\0))))))
|
| 62 | (string-append "https://sqlite.org/2018/sqlite-autoconf-"
|
| 63 | numeric-version ".tar.gz")))
|
| 64 | (sha256
|
| 65 | (base32
|
| 66 | "0jmprv2vpggzhy7ma4ynmv1jzn3pfiwzkld0kkg6hvgvqs44xlfr"))))
|
| 67 | (build-system gnu-build-system)
|
| 68 | (inputs `(("readline" ,readline)))
|
| 69 | (arguments
|
| 70 | `(#:configure-flags
|
| 71 | |
| 72 | |
| 73 | |
| 74 | (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
|
| 75 | "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
|
| 76 | "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
|
| 77 | (home-page "https://www.sqlite.org/")
|
| 78 | (synopsis "The SQLite database management system")
|
| 79 | (description
|
| 80 | "SQLite is a software library that implements a self-contained, serverless,
|
| 81 | zero-configuration, transactional SQL database engine. SQLite is the most
|
| 82 | widely deployed SQL database engine in the world. The source code for SQLite
|
| 83 | is in the public domain.")
|
| 84 | (license license:public-domain)))
|
| 85 |
|
| 86 | (define-public sqlite-3.26.0
|
| 87 | (package (inherit sqlite)
|
| 88 | (version "3.26.0")
|
| 89 | (source (origin
|
| 90 | (method url-fetch)
|
| 91 | (uri (let ((numeric-version
|
| 92 | (match (string-split version #\.)
|
| 93 | ((first-digit other-digits ...)
|
| 94 | (string-append first-digit
|
| 95 | (string-pad-right
|
| 96 | (string-concatenate
|
| 97 | (map (cut string-pad <> 2 #\0)
|
| 98 | other-digits))
|
| 99 | 6 #\0))))))
|
| 100 | (string-append "https://sqlite.org/2018/sqlite-autoconf-"
|
| 101 | numeric-version ".tar.gz")))
|
| 102 | (sha256
|
| 103 | (base32
|
| 104 | "0pdzszb4sp73hl36siiv3p300jvfvbcdxi2rrmkwgs6inwznmajx"))))))
|
| 105 |
|
| 106 | |
| 107 | (define-public sqlite-with-column-metadata
|
| 108 | (package/inherit sqlite
|
| 109 | (name "sqlite-with-column-metadata")
|
| 110 | (arguments
|
| 111 | (substitute-keyword-arguments (package-arguments sqlite)
|
| 112 | ((#:configure-flags flags)
|
| 113 | `(list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
|
| 114 | "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
|
| 115 | "-DSQLITE_ENABLE_DBSTAT_VTAB "
|
| 116 | "-DSQLITE_ENABLE_COLUMN_METADATA")))))))
|