Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / sqlcipher / default.nix
blob05576b0dab14106b689f30dfbea47ba0b2ce5281
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , openssl
5 , tcl
6 , installShellFiles
7 , buildPackages
8 , readline
9 , ncurses
10 , zlib
11 , sqlite
14 stdenv.mkDerivation rec {
15   pname = "sqlcipher";
16   version = "4.5.5";
18   src = fetchFromGitHub {
19     owner = "sqlcipher";
20     repo = "sqlcipher";
21     rev = "v${version}";
22     hash = "sha256-amWYkVQr+Rmcj+32lFDRq43Q+Ojj8V8B6KoURqdwGt0=";
23   };
25   nativeBuildInputs = [
26     installShellFiles
27     tcl
28   ];
30   buildInputs = [
31     readline
32     ncurses
33     openssl
34     zlib
35   ];
37   depsBuildBuild = [
38     buildPackages.stdenv.cc
39   ];
41   configureFlags = [
42     "--enable-threadsafe"
43     "--with-readline-inc=-I${lib.getDev readline}/include"
44   ];
46   CFLAGS = [
47     # We want feature parity with sqlite
48     sqlite.NIX_CFLAGS_COMPILE
49     "-DSQLITE_HAS_CODEC"
50   ];
52   BUILD_CC = "$(CC_FOR_BUILD)";
54   TCLLIBDIR = "${placeholder "out"}/lib/tcl${lib.versions.majorMinor tcl.version}";
56   postInstall = ''
57     installManPage sqlcipher.1
58   '';
60   meta = with lib; {
61     changelog = "https://github.com/sqlcipher/sqlcipher/blob/v${version}/CHANGELOG.md";
62     description = "SQLite extension that provides 256 bit AES encryption of database files";
63     homepage = "https://www.zetetic.net/sqlcipher/";
64     license = licenses.bsd3;
65     maintainers = with maintainers; [ ];
66     platforms = platforms.unix;
67   };