From c63692d89abf6090c6603812276c2158499c104f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 26 Oct 2021 13:34:05 +0200 Subject: [PATCH] sqlcipher: compile with zlib, readline and tcl support by default --- .../libraries/sqlcipher/default.nix | 22 ++++++++++++------- pkgs/top-level/all-packages.nix | 5 +---- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/sqlcipher/default.nix b/pkgs/development/libraries/sqlcipher/default.nix index 1874e3d82552..e6965abf8984 100644 --- a/pkgs/development/libraries/sqlcipher/default.nix +++ b/pkgs/development/libraries/sqlcipher/default.nix @@ -1,6 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, buildPackages, readline ? null, ncurses ? null }: - -assert readline != null -> ncurses != null; +{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, buildPackages, readline, ncurses, zlib }: stdenv.mkDerivation rec { pname = "sqlcipher"; @@ -14,16 +12,24 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ installShellFiles tcl ]; - buildInputs = [ readline ncurses openssl ]; + buildInputs = [ readline ncurses openssl zlib ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; - configureFlags = [ "--enable-threadsafe" "--disable-tcl" ]; + configureFlags = [ + "--enable-threadsafe" + "--with-readline-inc=-I${lib.getDev readline}/include" + ]; + + CFLAGS = [ + "-DSQLITE_ENABLE_COLUMN_METADATA=1" + "-DSQLITE_SECURE_DELETE=1" + "-DSQLITE_ENABLE_UNLOCK_NOTIFY=1" + "-DSQLITE_HAS_CODEC" + ]; - 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? + TCLLIBDIR = "${placeholder "out"}/lib/tcl${lib.versions.majorMinor tcl.version}"; postInstall = '' installManPage sqlcipher.1 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aaa4638d7d18..546f54bbc92d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19548,10 +19548,7 @@ with pkgs; dqlite = callPackage ../development/libraries/dqlite { }; - sqlcipher = lowPrio (callPackage ../development/libraries/sqlcipher { - readline = null; - ncurses = null; - }); + sqlcipher = callPackage ../development/libraries/sqlcipher { }; standardnotes = callPackage ../applications/editors/standardnotes { };