depot/third_party/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix
Default email 4fc29cb41f Project import generated by Copybara.
GitOrigin-RevId: 135073a87b7e2c631739f4ffa016e1859b1a425e
2020-05-29 08:06:01 +02:00

37 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, readline ? null, ncurses ? null }:
assert readline != null -> ncurses != null;
stdenv.mkDerivation rec {
pname = "sqlcipher";
version = "4.4.0";
src = fetchFromGitHub {
owner = "sqlcipher";
repo = "sqlcipher";
rev = "v${version}";
sha256 = "0mx0n5n3s39r25b31sdkrd4psxjqqgcv6rpm9d57w5rlk75g2fiv";
};
nativeBuildInputs = [ installShellFiles ];
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?
postInstall = ''
installManPage sqlcipher.1
'';
meta = with stdenv.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;
};
}