Revert "sqlite{,-analyzer}: use the same src (#40945)"

This reverts commit e28a586f94.
wip/yesman
Will Dietz 6 years ago
parent 2760b24462
commit 232bc96376
  1. 18
      pkgs/development/libraries/sqlite/analyzer.nix
  2. 11
      pkgs/development/libraries/sqlite/archive-version.nix
  3. 31
      pkgs/development/libraries/sqlite/default.nix

@ -1,11 +1,23 @@
{ stdenv, tcl, sqlite }:
{ stdenv, fetchurl, unzip, sqlite, tcl }:
let
archiveVersion = import ./archive-version.nix stdenv.lib;
in
stdenv.mkDerivation rec {
name = "sqlite-analyzer-${version}";
inherit (sqlite) src version;
version = "3.23.1";
src = assert version == sqlite.version; fetchurl {
url = "https://sqlite.org/2018/sqlite-src-${archiveVersion version}.zip";
sha256 = "1z3xr8d8ds4l8ndkg34cii13d0w790nlxdkrw6virinqi7wmmd1d";
};
nativeBuildInputs = [ unzip ];
buildInputs = [ tcl ];
nativeBuildInputs = [ tcl ];
makeFlags = [ "sqlite3_analyzer" ];
installPhase = "install -Dt $out/bin sqlite3_analyzer";
meta = with stdenv.lib; {

@ -0,0 +1,11 @@
lib: version:
with lib;
let
fragments = splitString "." version;
major = head fragments;
minor = concatMapStrings (fixedWidthNumber 2) (tail fragments);
in
major + minor + "00"

@ -1,40 +1,29 @@
{ stdenv, fetchzip, tcl, zlib, interactive ? false, readline ? null, ncurses ? null }:
{ stdenv, fetchurl, zlib, interactive ? false, readline ? null, ncurses ? null }:
assert interactive -> readline != null && ncurses != null;
with stdenv.lib;
let
archiveVersion = version:
let
segments = splitString "." version;
major = head segments;
minor = concatMapStrings (fixedWidthNumber 2) (tail segments);
in
major + minor + "00";
archiveVersion = import ./archive-version.nix stdenv.lib;
in
stdenv.mkDerivation rec {
name = "sqlite-${version}";
version = "3.23.1";
src = fetchzip {
url = "https://sqlite.org/2018/sqlite-src-${archiveVersion version}.zip";
sha256 = "1dshxmiqdiympg1i2jsz3x543zmcgzhn78lpsjc0546rir0s0zk0";
# NB! Make sure to update analyzer.nix src (in the same directory).
src = fetchurl {
url = "https://sqlite.org/2018/sqlite-autoconf-${archiveVersion version}.tar.gz";
sha256 = "09ggapjhqjb2pzk0wkfczil77plijg3d77m2bpzlwx2y7ql2p14j";
};
outputs = [ "bin" "dev" "out" ];
separateDebugInfo = stdenv.isLinux;
nativeBuildInputs = [ tcl ];
buildInputs = [ zlib ]
++ optionals interactive [ readline ncurses ];
buildInputs = [ zlib ] ++ optionals interactive [ readline ncurses ];
configureFlags = [
# Disables libtclsqlite.so, tcl is still required for the build itself:
"--disable-tcl"
"--enable-threadsafe"
] ++ optional interactive "--enable-readline";
configureFlags = [ "--enable-threadsafe" ] ++ optional interactive "--enable-readline";
NIX_CFLAGS_COMPILE = [
"-DSQLITE_ENABLE_COLUMN_METADATA"
@ -72,9 +61,9 @@ stdenv.mkDerivation rec {
# Necessary for FTS5 on Linux
export NIX_LDFLAGS="$NIX_LDFLAGS -lm"
echo
echo ""
echo "NIX_CFLAGS_COMPILE = $NIX_CFLAGS_COMPILE"
echo
echo ""
'';
meta = {

Loading…
Cancel
Save