projects/guix·blob version-1.0.0 · refs

116 lines · 5.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2015, 2018 Ludovic Courtès <[email protected]>
3;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <[email protected]>
4;;; Copyright © 2014 Sree Harsha Totakura <[email protected]>
5;;; Copyright © 2015, 2016 Sou Bunnbu <[email protected]>
6;;; Copyright © 2016 Efraim Flashner <[email protected]>
7;;; Copyright © 2016 Ben Woodcroft <[email protected]>
8;;; Copyright © 2016 David Craven <[email protected]>
9;;; Copyright © 2016, 2017, 2018 Marius Bakke <[email protected]>
10;;; Copyright © 2017 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2017 Jelle Licht <[email protected]>
12;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
13;;; Copyright © 2018 Alex Vong <[email protected]>
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages 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;;; Commentary:
42;;;
43;;; This module has been separated from (gnu packages databases) to reduce the
44;;; number of module references for core packages.
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 ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
72 ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse
73 ;; to use the system SQLite unless these options are enabled.
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,
81zero-configuration, transactional SQL database engine. SQLite is the most
82widely deployed SQL database engine in the world. The source code for SQLite
83is 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;; This is used by Qt.
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")))))))