diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/sqlcipher')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/sqlcipher/default.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix b/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix new file mode 100644 index 000000000000..d35f654650ee --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix @@ -0,0 +1,68 @@ +{ lib +, stdenv +, fetchFromGitHub +, openssl +, tcl +, installShellFiles +, buildPackages +, readline +, ncurses +, zlib +, sqlite +}: + +stdenv.mkDerivation rec { + pname = "sqlcipher"; + version = "4.5.6"; + + src = fetchFromGitHub { + owner = "sqlcipher"; + repo = "sqlcipher"; + rev = "v${version}"; + hash = "sha256-tfDjl1l1vMWZsxFNEPK9jOrUN260/3k2kX6rVHPCZ0k="; + }; + + 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; + }; +} |