2020-05-29 06:06:01 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, readline ? null, ncurses ? null }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
assert readline != null -> ncurses != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sqlcipher";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "4.4.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sqlcipher";
|
|
|
|
repo = "sqlcipher";
|
|
|
|
rev = "v${version}";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "0zhww6fpnfflnzp6091npz38ab6cpq75v3ghqvcj5kqg09vqm5na";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ readline ncurses openssl tcl ];
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-threadsafe" "--disable-tcl" ];
|
|
|
|
|
|
|
|
CFLAGS = [ "-DSQLITE_ENABLE_COLUMN_METADATA=1" "-DSQLITE_SECURE_DELETE=1" "-DSQLITE_ENABLE_UNLOCK_NOTIFY=1" "-DSQLITE_HAS_CODEC" ];
|
|
|
|
LDFLAGS = lib.optional (readline != null) "-lncurses";
|
|
|
|
|
|
|
|
doCheck = false; # fails. requires tcl?
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage sqlcipher.1
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
homepage = "https://www.zetetic.net/sqlcipher/";
|
|
|
|
description = "SQLite extension that provides 256 bit AES encryption of database files";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|