2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, openssl
|
|
|
|
, tcl
|
|
|
|
, installShellFiles
|
|
|
|
, buildPackages
|
|
|
|
, readline
|
|
|
|
, ncurses
|
|
|
|
, zlib
|
|
|
|
, sqlite
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sqlcipher";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "4.5.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sqlcipher";
|
|
|
|
repo = "sqlcipher";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-amWYkVQr+Rmcj+32lFDRq43Q+Ojj8V8B6KoURqdwGt0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
tcl
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
readline
|
|
|
|
ncurses
|
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
depsBuildBuild = [
|
|
|
|
buildPackages.stdenv.cc
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-threadsafe"
|
|
|
|
"--with-readline-inc=-I${lib.getDev readline}/include"
|
|
|
|
];
|
|
|
|
|
|
|
|
CFLAGS = [
|
2022-01-19 23:45:15 +00:00
|
|
|
# We want feature parity with sqlite
|
|
|
|
sqlite.NIX_CFLAGS_COMPILE
|
2021-10-28 06:52:43 +00:00
|
|
|
"-DSQLITE_HAS_CODEC"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
BUILD_CC = "$(CC_FOR_BUILD)";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
TCLLIBDIR = "${placeholder "out"}/lib/tcl${lib.versions.majorMinor tcl.version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage sqlcipher.1
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/sqlcipher/sqlcipher/blob/v${version}/CHANGELOG.md";
|
2020-05-29 06:06:01 +00:00
|
|
|
description = "SQLite extension that provides 256 bit AES encryption of database files";
|
2022-12-28 21:21:41 +00:00
|
|
|
homepage = "https://www.zetetic.net/sqlcipher/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2022-12-28 21:21:41 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|