depot/third_party/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix
Default email a3bb8d7922 Project import generated by Copybara.
GitOrigin-RevId: 439b1605227b8adb1357b55ce8529d541abbe9eb
2021-08-06 00:33:18 +03:00

38 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, buildPackages, readline ? null, ncurses ? null }:
assert readline != null -> ncurses != null;
stdenv.mkDerivation rec {
pname = "sqlcipher";
version = "4.4.3";
src = fetchFromGitHub {
owner = "sqlcipher";
repo = "sqlcipher";
rev = "v${version}";
sha256 = "sha256-E23PTNnVZbBQtHL0YjUwHNVUA76XS8rlARBOVvX6zZw=";
};
nativeBuildInputs = [ installShellFiles tcl ];
buildInputs = [ readline ncurses openssl ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
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";
BUILD_CC = "$(CC_FOR_BUILD)";
doCheck = false; # fails. requires tcl?
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;
};
}