From 20b9e3ac19b77b33f88d45e33ad9ceafacbdb1bd Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 12 Feb 2016 16:09:52 -0800 Subject: [PATCH] gnu: Add sqlite-legacy-for-python and use it in python's definition. * gnu/packages/database.scm (sqlite-legacy-for-python): New variable. * gnu/packages/python.scm (python): Use sqlite-legacy-for-python. --- gnu/packages/databases.scm | 30 ++++++++++++++++++++++++++++++ gnu/packages/python.scm | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index b36f5d8..c00cbb4 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016 Christopher Allan Webber ;;; ;;; This file is part of GNU Guix. ;;; @@ -388,6 +389,35 @@ widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.") (license public-domain))) +;; Python packages (well, at least python-sqlalchemy) break with the latest +;; release of sqlite, so we need to keep this around for legacy purposes... +(define-public sqlite-legacy-for-python + (package + (inherit sqlite) + (version "3.8.11.1") + ;; Repeating a lot of the above definition... there's no way around it! + (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)))))) + (list + (string-append + "https://fossies.org/linux/misc/sqlite-autoconf-" + numeric-version ".tar.gz") + (string-append + "http://distfiles.gentoo.org/distfiles/" + "/sqlite-autoconf-" numeric-version ".tar.gz")))) + (sha256 + (base32 + "1dnkl4qr1dgaprbyf3jddfiynkhxnin86qabni47wjlc0fnb16gv")))))) + (define-public tdb (package (name "tdb") diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 3758eed..8d6f520 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -233,7 +233,8 @@ `(("bzip2" ,bzip2) ("gdbm" ,gdbm) ("libffi" ,libffi) ; for ctypes - ("sqlite" ,sqlite) ; for sqlite extension + ;; Hopefully soon we'll have this back at vanilla sqlite + ("sqlite" ,sqlite-legacy-for-python) ; for sqlite extension ("openssl" ,openssl) ("readline" ,readline) ("zlib" ,zlib) -- 2.6.3