sqlcipher: fix static build

This commit is contained in:
Yureka 2021-08-04 01:10:25 +02:00
parent 9978f777fc
commit 3e3e445d8d
No known key found for this signature in database
GPG key ID: B95AE06334AFF6BA

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, readline ? null, ncurses ? null }:
{ stdenv, lib, fetchFromGitHub, openssl, tcl, installShellFiles, buildPackages, readline ? null, ncurses ? null }:
assert readline != null -> ncurses != null;
@ -13,14 +13,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-E23PTNnVZbBQtHL0YjUwHNVUA76XS8rlARBOVvX6zZw=";
};
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ readline ncurses openssl tcl ];
nativeBuildInputs = [ installShellFiles tcl ];
buildInputs = [ readline ncurses openssl ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
configureFlags = [ "--enable-threadsafe" "--disable-tcl" ];
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?