From patchwork Thu Sep 22 03:58:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Patterson X-Patchwork-Id: 15887 Received: (qmail 76864 invoked by uid 89); 22 Sep 2016 03:59:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=3.3.1 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Sep 2016 03:59:13 +0000 Received: from localhost ([::1]:47410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmvAG-0006UN-3q for patchwork@sourceware.org; Wed, 21 Sep 2016 23:59:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmv9r-0006CS-Ly for guix-devel@gnu.org; Wed, 21 Sep 2016 23:58:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmv9o-0004tS-IA for guix-devel@gnu.org; Wed, 21 Sep 2016 23:58:47 -0400 Received: from mailservices.uwaterloo.ca ([129.97.128.141]:35913 helo=minos.uwaterloo.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmv9o-0004rz-C0 for guix-devel@gnu.org; Wed, 21 Sep 2016 23:58:44 -0400 Received: from jalisou.gateway.2wire.net (bas1-jockvale05-3096537436.dsl.bell.ca [184.145.105.92]) (authenticated bits=0) by minos.uwaterloo.ca (8.14.4/8.14.4) with ESMTP id u8M3wVYH029684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 21 Sep 2016 23:58:40 -0400 From: Andy Patterson To: guix-devel@gnu.org Subject: [PATCH v2 1/2] gnu: Add sqlcipher. Date: Wed, 21 Sep 2016 23:58:28 -0400 Message-Id: <20160922035829.18825-2-ajpatter@uwaterloo.ca> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20160922035829.18825-1-ajpatter@uwaterloo.ca> References: <20160914193014.24224-1-ajpatter@uwaterloo.ca> <20160922035829.18825-1-ajpatter@uwaterloo.ca> MIME-Version: 1.0 X-UUID: 211f65f7-57c6-4b5e-bb7a-2b94d292a676 X-MIME-Autoconverted: from 8bit to quoted-printable by minos.uwaterloo.ca id u8M3wVYH029684 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 129.97.128.141 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" * gnu/packages/database.scm (sqlcipher): New variable. --- gnu/packages/databases.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 4f345e2..3e25d47 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2016 Roel Janssen ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2016 Andy Patterson ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,11 +35,13 @@ #:use-module (gnu packages avahi) #:use-module (gnu packages bash) #:use-module (gnu packages boost) + #:use-module (gnu packages crypto) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages perl) #:use-module (gnu packages language) #:use-module (gnu packages linux) + #:use-module (gnu packages tcl) #:use-module (gnu packages tls) #:use-module (gnu packages compression) #:use-module (gnu packages ncurses) @@ -1150,3 +1153,53 @@ can autogenerate peewee models using @code{pwiz}, a model generator.") (define-public python2-peewee (package-with-python2 python-peewee)) + +(define-public sqlcipher + (package + (name "sqlcipher") + (version "3.3.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/sqlcipher/" name + "/archive/v" version ".tar.gz")) + (sha256 + (base32 "1gv58dlbpzrmznly52yqbxgvii0ib88zr3aszla1bsypwjr6flff")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system gnu-build-system) + (inputs + `(("libcrypto" ,openssl) + ("libtcl8.6" ,tcl))) ; required for running the tests + (native-inputs + `(("tcl" ,tcl))) + (arguments + '(#:configure-flags + '("--enable-tempstore=yes" + "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3" + "LDFLAGS=-lcrypto -ltcl8.6" + "--disable-tcl") + ;; tests cannot be run from the Makefile + ;; see: + #:test-target "testfixture" + #:phases + (modify-phases %standard-phases + (add-before 'check 'build-test-runner + (assoc-ref %standard-phases 'check)) + (replace 'check + (lambda _ + (zero? + (system* "./testfixture" "test/crypto.test"))))))) + (home-page "https://www.zetetic.net/sqlcipher/") + (synopsis + "Library providing transparent encryption of SQLite database files") + (description "SQLCipher is an implementation of SQLite, extended to +provide transparent 256-bit AES encryption of database files. Pages are +encrypted before being written to disk and are decrypted when read back. It’s +well suited for protecting embedded application databases and for mobile +development.") + ;; The source files + ;; src/{crypto.c,crypto_impl.c,crypto.h,crypto_cc.c,crypto_libtomcrypt.c}, + ;; src/{crypto_openssl.c,sqlcipher.h}, tool/crypto-speedtest.tcl, + ;; test/crypto.test are licensed under a 3-clause BSD license. All other + ;; source files are in the public domain. + (license (list license:public-domain license:bsd-3))))