blob: 13714b4825cf10585f5f2b3324e65b66130b38f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, buildPackages, readline, ncurses, zlib, sqlite }:
stdenv.mkDerivation rec {
pname = "sqlcipher";
version = "4.5.1";
src = fetchFromGitHub {
owner = "sqlcipher";
repo = "sqlcipher";
rev = "v${version}";
sha256 = "sha256-cvbR3tav6DjIdJB/x2q5Oq7ju9q63z75b6q1uHYY9bE=";
};
nativeBuildInputs = [ installShellFiles tcl ];
buildInputs = [ readline ncurses openssl zlib ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
configureFlags = [
"--enable-threadsafe"
"--with-readline-inc=-I${lib.getDev readline}/include"
];
CFLAGS = [
# We want feature parity with sqlite
sqlite.NIX_CFLAGS_COMPILE
"-DSQLITE_HAS_CODEC"
];
BUILD_CC = "$(CC_FOR_BUILD)";
TCLLIBDIR = "${placeholder "out"}/lib/tcl${lib.versions.majorMinor tcl.version}";
postInstall = ''
installManPage sqlcipher.1
'';
meta = with lib; {
homepage = "https://www.zetetic.net/sqlcipher/";
description = "SQLite extension that provides 256 bit AES encryption of database files";
platforms = platforms.unix;
license = licenses.bsd3;
};
}
|