@@ -1,40 +1,29 @@
1−{ stdenv, fetchzip, tcl, zlib, interactive ? false, readline ? null, ncurses ? null }:
1+{ stdenv, fetchurl, zlib, interactive ? false, readline ? null, ncurses ? null }:
22
33assert interactive -> readline != null && ncurses != null;
44
55with stdenv.lib;
66
77let
8− archiveVersion = version:
9− let
10− segments = splitString "." version;
11− major = head segments;
12− minor = concatMapStrings (fixedWidthNumber 2) (tail segments);
13− in
14− major + minor + "00";
8+ archiveVersion = import ./archive-version.nix stdenv.lib;
159in
1610
1711stdenv.mkDerivation rec {
1812 name = "sqlite-${version}";
1913 version = "3.23.1";
2014
21− src = fetchzip {
22− url = "https://sqlite.org/2018/sqlite-src-${archiveVersion version}.zip";
23− sha256 = "1dshxmiqdiympg1i2jsz3x543zmcgzhn78lpsjc0546rir0s0zk0";
15+ # NB! Make sure to update analyzer.nix src (in the same directory).
16+ src = fetchurl {
17+ url = "https://sqlite.org/2018/sqlite-autoconf-${archiveVersion version}.tar.gz";
18+ sha256 = "09ggapjhqjb2pzk0wkfczil77plijg3d77m2bpzlwx2y7ql2p14j";
2419 };
2520
2621 outputs = [ "bin" "dev" "out" ];
2722 separateDebugInfo = stdenv.isLinux;
2823
29− nativeBuildInputs = [ tcl ];
30− buildInputs = [ zlib ]
31− ++ optionals interactive [ readline ncurses ];
24+ buildInputs = [ zlib ] ++ optionals interactive [ readline ncurses ];
3225
33− configureFlags = [
34− # Disables libtclsqlite.so, tcl is still required for the build itself:
35− "--disable-tcl"
36− "--enable-threadsafe"
37− ] ++ optional interactive "--enable-readline";
26+ configureFlags = [ "--enable-threadsafe" ] ++ optional interactive "--enable-readline";
3827
3928 NIX_CFLAGS_COMPILE = [
4029 "-DSQLITE_ENABLE_COLUMN_METADATA"
@@ -72,9 +61,9 @@ stdenv.mkDerivation rec {
7261 # Necessary for FTS5 on Linux
7362 export NIX_LDFLAGS="$NIX_LDFLAGS -lm"
7463
75− echo
64+ echo ""
7665 echo "NIX_CFLAGS_COMPILE = $NIX_CFLAGS_COMPILE"
77− echo
66+ echo ""
7867 '';
7968
8069 meta = {