2020-05-24 10:20:00 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, readline ? null, ncurses ? null }:
|
2014-07-02 10:18:27 +01:00
|
|
|
|
|
|
|
assert readline != null -> ncurses != null;
|
|
|
|
|
2016-08-18 00:19:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "sqlcipher";
|
2020-05-24 11:05:39 +01:00
|
|
|
version = "4.4.0";
|
2014-07-02 10:18:27 +01:00
|
|
|
|
2016-08-18 00:19:45 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sqlcipher";
|
|
|
|
repo = "sqlcipher";
|
|
|
|
rev = "v${version}";
|
2020-05-24 11:05:39 +01:00
|
|
|
sha256 = "0mx0n5n3s39r25b31sdkrd4psxjqqgcv6rpm9d57w5rlk75g2fiv";
|
2014-07-02 10:18:27 +01:00
|
|
|
};
|
|
|
|
|
2020-05-24 10:20:00 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2014-07-02 10:18:27 +01:00
|
|
|
buildInputs = [ readline ncurses openssl tcl ];
|
|
|
|
|
2016-08-18 00:19:45 +01:00
|
|
|
configureFlags = [ "--enable-threadsafe" "--disable-tcl" ];
|
2014-07-02 10:18:27 +01:00
|
|
|
|
2016-08-18 00:19:45 +01: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 10:18:27 +01:00
|
|
|
|
2018-04-25 04:20:18 +01:00
|
|
|
doCheck = false; # fails. requires tcl?
|
|
|
|
|
2020-05-24 10:20:00 +01:00
|
|
|
postInstall = ''
|
|
|
|
installManPage sqlcipher.1
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-05-24 10:20:00 +01:00
|
|
|
homepage = "https://www.zetetic.net/sqlcipher/";
|
|
|
|
description = "SQLite extension that provides 256 bit AES encryption of database files";
|
2016-08-18 00:19:45 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.bsd3;
|
2014-07-02 10:18:27 +01:00
|
|
|
};
|
|
|
|
}
|