2021-10-26 12:34:05 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, buildPackages, readline, ncurses, zlib }:
|
2014-07-02 10:18:27 +01:00
|
|
|
|
2016-08-18 00:19:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "sqlcipher";
|
2022-01-01 22:30:35 +00:00
|
|
|
version = "4.5.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}";
|
2022-01-01 22:30:35 +00:00
|
|
|
sha256 = "sha256-MFuFyKvOOrDrq9cDPQlNK6/YHSkaRX4qbw/44m5CRh4=";
|
2014-07-02 10:18:27 +01:00
|
|
|
};
|
|
|
|
|
2021-08-04 00:10:25 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles tcl ];
|
2021-10-26 12:34:05 +01:00
|
|
|
buildInputs = [ readline ncurses openssl zlib ];
|
2021-08-04 00:10:25 +01:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2014-07-02 10:18:27 +01:00
|
|
|
|
2021-10-26 12:34:05 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-threadsafe"
|
|
|
|
"--with-readline-inc=-I${lib.getDev readline}/include"
|
|
|
|
];
|
|
|
|
|
|
|
|
CFLAGS = [
|
|
|
|
"-DSQLITE_ENABLE_COLUMN_METADATA=1"
|
|
|
|
"-DSQLITE_SECURE_DELETE=1"
|
|
|
|
"-DSQLITE_ENABLE_UNLOCK_NOTIFY=1"
|
|
|
|
"-DSQLITE_HAS_CODEC"
|
|
|
|
];
|
2014-07-02 10:18:27 +01:00
|
|
|
|
2021-08-04 00:10:25 +01:00
|
|
|
BUILD_CC = "$(CC_FOR_BUILD)";
|
2014-07-02 10:18:27 +01:00
|
|
|
|
2021-10-26 12:34:05 +01:00
|
|
|
TCLLIBDIR = "${placeholder "out"}/lib/tcl${lib.versions.majorMinor tcl.version}";
|
2018-04-25 04:20:18 +01:00
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|