2016-08-18 01:19:45 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, openssl, tcl, readline ? null, ncurses ? null }:
|
2014-07-02 11:18:27 +02:00
|
|
|
|
|
|
|
assert readline != null -> ncurses != null;
|
|
|
|
|
2016-08-18 01:19:45 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "sqlcipher";
|
2019-12-24 19:16:20 +01:00
|
|
|
version = "4.3.0";
|
2014-07-02 11:18:27 +02:00
|
|
|
|
2016-08-18 01:19:45 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sqlcipher";
|
|
|
|
repo = "sqlcipher";
|
|
|
|
rev = "v${version}";
|
2019-12-24 19:16:20 +01:00
|
|
|
sha256 = "0s1aiwl61nl3b4ym4v050wlbbx0iypknqsj3ar12dw5hljlzx6f8";
|
2014-07-02 11:18:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ readline ncurses openssl tcl ];
|
|
|
|
|
2016-08-18 01:19:45 +02:00
|
|
|
configureFlags = [ "--enable-threadsafe" "--disable-tcl" ];
|
2014-07-02 11:18:27 +02:00
|
|
|
|
2016-08-18 01:19:45 +02:00
|
|
|
CFLAGS = [ "-DSQLITE_ENABLE_COLUMN_METADATA=1" "-DSQLITE_SECURE_DELETE=1" "-DSQLITE_ENABLE_UNLOCK_NOTIFY=1" "-DSQLITE_HAS_CODEC" ];
|
|
|
|
LDFLAGS = lib.optional (readline != null) "-lncurses";
|
2014-07-02 11:18:27 +02:00
|
|
|
|
2018-04-25 05:20:18 +02:00
|
|
|
doCheck = false; # fails. requires tcl?
|
|
|
|
|
2016-08-18 01:19:45 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-07-02 11:27:24 +02:00
|
|
|
homepage = http://sqlcipher.net/;
|
2014-07-02 11:18:27 +02:00
|
|
|
description = "Full Database Encryption for SQLite";
|
2016-08-18 01:19:45 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.bsd3;
|
2014-07-02 11:18:27 +02:00
|
|
|
};
|
|
|
|
}
|