2021-08-05 21:33:18 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, buildPackages, readline ? null, ncurses ? null }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
assert readline != null -> ncurses != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sqlcipher";
|
2021-04-25 03:57:28 +00:00
|
|
|
version = "4.4.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sqlcipher";
|
|
|
|
repo = "sqlcipher";
|
|
|
|
rev = "v${version}";
|
2021-04-25 03:57:28 +00:00
|
|
|
sha256 = "sha256-E23PTNnVZbBQtHL0YjUwHNVUA76XS8rlARBOVvX6zZw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles tcl ];
|
|
|
|
buildInputs = [ readline ncurses openssl ];
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
2021-08-05 21:33:18 +00:00
|
|
|
BUILD_CC = "$(CC_FOR_BUILD)";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|