nixpkgs/pkgs/development/libraries/sqlcipher/default.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

2021-08-03 23:10:25 +00:00
{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, buildPackages, readline ? null, ncurses ? null }:
2014-07-02 09:18:27 +00:00
assert readline != null -> ncurses != null;
2016-08-17 23:19:45 +00:00
stdenv.mkDerivation rec {
pname = "sqlcipher";
2021-03-09 16:29:48 +00:00
version = "4.4.3";
2014-07-02 09:18:27 +00:00
2016-08-17 23:19:45 +00:00
src = fetchFromGitHub {
owner = "sqlcipher";
repo = "sqlcipher";
rev = "v${version}";
2021-03-09 16:29:48 +00:00
sha256 = "sha256-E23PTNnVZbBQtHL0YjUwHNVUA76XS8rlARBOVvX6zZw=";
2014-07-02 09:18:27 +00:00
};
2021-08-03 23:10:25 +00:00
nativeBuildInputs = [ installShellFiles tcl ];
buildInputs = [ readline ncurses openssl ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
2014-07-02 09:18:27 +00:00
2016-08-17 23:19:45 +00:00
configureFlags = [ "--enable-threadsafe" "--disable-tcl" ];
2014-07-02 09:18:27 +00:00
2016-08-17 23:19:45 +00:00
CFLAGS = [ "-DSQLITE_ENABLE_COLUMN_METADATA=1" "-DSQLITE_SECURE_DELETE=1" "-DSQLITE_ENABLE_UNLOCK_NOTIFY=1" "-DSQLITE_HAS_CODEC" ];
LDFLAGS = lib.optional (readline != null) "-lncurses";
2021-08-03 23:10:25 +00:00
BUILD_CC = "$(CC_FOR_BUILD)";
2014-07-02 09:18:27 +00:00
doCheck = false; # fails. requires tcl?
2020-05-24 09:20:00 +00:00
postInstall = ''
installManPage sqlcipher.1
'';
meta = with lib; {
2020-05-24 09:20:00 +00:00
homepage = "https://www.zetetic.net/sqlcipher/";
description = "SQLite extension that provides 256 bit AES encryption of database files";
2016-08-17 23:19:45 +00:00
platforms = platforms.unix;
license = licenses.bsd3;
2014-07-02 09:18:27 +00:00
};
}