depot/third_party/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix
Default email a3d4720129 Project import generated by Copybara.
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
2022-12-28 22:21:41 +01:00

68 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, openssl
, tcl
, installShellFiles
, buildPackages
, readline
, ncurses
, zlib
, sqlite
}:
stdenv.mkDerivation rec {
pname = "sqlcipher";
version = "4.5.3";
src = fetchFromGitHub {
owner = "sqlcipher";
repo = "sqlcipher";
rev = "v${version}";
hash = "sha256-yo7bB6xgF23Hdur25fprSFgbuxNclseUCdq3DFAfIK8=";
};
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; {
changelog = "https://github.com/sqlcipher/sqlcipher/blob/v${version}/CHANGELOG.md";
description = "SQLite extension that provides 256 bit AES encryption of database files";
homepage = "https://www.zetetic.net/sqlcipher/";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
platforms = platforms.unix;
};
}