From cd0322a3efd96577de9ab35e4432d1ae399257c8 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 15 Jan 2019 21:47:05 +0100 Subject: gnu: Move sqlite to separate module. * gnu/packages/databases.scm (sqlite, sqlite-3.26.0, sqlite-with-fts5, sqlite-with-column-metadata): Move variables from here... * gnu/packages/sqlite.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/apl.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/code.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/dc.scm, gnu/packages/disk.scm, gnu/packages/ebook.scm, gnu/packages/education.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/file-systems.scm, gnu/packages/freedesktop.scm, gnu/packages/ftp.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gps.scm, gnu/packages/guile.scm, gnu/packages/ibus.scm, gnu/packages/kerberos.scm, gnu/packages/kodi.scm, gnu/packages/lisp.scm, gnu/packages/mail.scm, gnu/packages/messaging.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nfs.scm, gnu/packages/ocaml.scm, gnu/packages/package-management.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/php.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/scheme.scm, gnu/packages/sync.scm, gnu/packages/syndication.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/web-browsers.scm, gnu/packages/webkit.scm: Adjust module references. --- gnu/packages/sqlite.scm | 125 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 gnu/packages/sqlite.scm (limited to 'gnu/packages/sqlite.scm') diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm new file mode 100644 index 0000000000..5e5bbd8fb6 --- /dev/null +++ b/gnu/packages/sqlite.scm @@ -0,0 +1,125 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013, 2015, 2018 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver +;;; Copyright © 2014 Sree Harsha Totakura +;;; Copyright © 2015, 2016 Sou Bunnbu +;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016 Ben Woodcroft +;;; Copyright © 2016 David Craven +;;; Copyright © 2016, 2017, 2018 Marius Bakke +;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2017 Jelle Licht +;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018 Alex Vong +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages sqlite) + #:use-module (gnu packages) + #:use-module (gnu packages readline) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix utils) + #:use-module (ice-9 match) + #:use-module (srfi srfi-26)) + +;;; Commentary: +;;; +;;; This module has been separated from (gnu packages databases) to reduce the +;;; number of module references for core packages. + +(define-public sqlite + (package + (name "sqlite") + (replacement sqlite-3.26.0) + (version "3.24.0") + (source (origin + (method url-fetch) + (uri (let ((numeric-version + (match (string-split version #\.) + ((first-digit other-digits ...) + (string-append first-digit + (string-pad-right + (string-concatenate + (map (cut string-pad <> 2 #\0) + other-digits)) + 6 #\0)))))) + (string-append "https://sqlite.org/2018/sqlite-autoconf-" + numeric-version ".tar.gz"))) + (sha256 + (base32 + "0jmprv2vpggzhy7ma4ynmv1jzn3pfiwzkld0kkg6hvgvqs44xlfr")))) + (build-system gnu-build-system) + (inputs `(("readline" ,readline))) + (arguments + `(#:configure-flags + ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and + ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse + ;; to use the system SQLite unless these options are enabled. + (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE " + "-DSQLITE_ENABLE_UNLOCK_NOTIFY " + "-DSQLITE_ENABLE_DBSTAT_VTAB")))) + (home-page "https://www.sqlite.org/") + (synopsis "The SQLite database management system") + (description + "SQLite is a software library that implements a self-contained, serverless, +zero-configuration, transactional SQL database engine. SQLite is the most +widely deployed SQL database engine in the world. The source code for SQLite +is in the public domain.") + (license license:public-domain))) + +(define-public sqlite-3.26.0 + (package (inherit sqlite) + (version "3.26.0") + (source (origin + (method url-fetch) + (uri (let ((numeric-version + (match (string-split version #\.) + ((first-digit other-digits ...) + (string-append first-digit + (string-pad-right + (string-concatenate + (map (cut string-pad <> 2 #\0) + other-digits)) + 6 #\0)))))) + (string-append "https://sqlite.org/2018/sqlite-autoconf-" + numeric-version ".tar.gz"))) + (sha256 + (base32 + "0pdzszb4sp73hl36siiv3p300jvfvbcdxi2rrmkwgs6inwznmajx")))))) + +;; This is used by Tracker. +(define-public sqlite-with-fts5 + (package/inherit sqlite + (name "sqlite-with-fts5") + (arguments + (substitute-keyword-arguments (package-arguments sqlite) + ((#:configure-flags flags) + `(cons "--enable-fts5" ,flags)))))) + +;; This is used by Qt. +(define-public sqlite-with-column-metadata + (package/inherit sqlite + (name "sqlite-with-column-metadata") + (arguments + (substitute-keyword-arguments (package-arguments sqlite) + ((#:configure-flags flags) + `(list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE " + "-DSQLITE_ENABLE_UNLOCK_NOTIFY " + "-DSQLITE_ENABLE_DBSTAT_VTAB " + "-DSQLITE_ENABLE_COLUMN_METADATA"))))))) -- cgit v1.2.3