aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/sqlite
diff options
context:
space:
mode:
authorYegor Timoshenko <yegortimoshenko@riseup.net>2018-05-23 01:27:20 +0300
committerGitHub <noreply@github.com>2018-05-23 01:27:20 +0300
commiteaf1c078369d3873aeb939d81a9aed9cef12141b (patch)
tree23eaa6f01977dba32f87592e912171aaf4e6abb4 /pkgs/development/libraries/sqlite
parentaedc169d7fbdc50131f6b6a4c3ccec4376f489fa (diff)
parent55807651582419dc94aa5a2a2600b88bbdea1776 (diff)
Merge pull request #40626 from dtzWill/update/sqlite-2.23.1
sqlite: 3.22.0 -> 3.23.1
Diffstat (limited to 'pkgs/development/libraries/sqlite')
-rw-r--r--pkgs/development/libraries/sqlite/analyzer.nix30
-rw-r--r--pkgs/development/libraries/sqlite/archive-version.nix11
-rw-r--r--pkgs/development/libraries/sqlite/default.nix29
-rw-r--r--pkgs/development/libraries/sqlite/sqlite3_analyzer.nix27
4 files changed, 60 insertions, 37 deletions
diff --git a/pkgs/development/libraries/sqlite/analyzer.nix b/pkgs/development/libraries/sqlite/analyzer.nix
new file mode 100644
index 000000000000..a0b1220b217d
--- /dev/null
+++ b/pkgs/development/libraries/sqlite/analyzer.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, unzip, sqlite, tcl }:
+
+let
+ archiveVersion = import ./archive-version.nix stdenv.lib;
+in
+
+stdenv.mkDerivation rec {
+ name = "sqlite-analyzer-${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 ];
+
+ makeFlags = [ "sqlite3_analyzer" ];
+
+ installPhase = "install -Dt $out/bin sqlite3_analyzer";
+
+ meta = with stdenv.lib; {
+ description = "A tool that shows statistics about SQLite databases";
+ downloadPage = http://sqlite.org/download.html;
+ homepage = http://www.sqlite.org;
+ maintainers = with maintainers; [ pesterhazy ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/development/libraries/sqlite/archive-version.nix b/pkgs/development/libraries/sqlite/archive-version.nix
new file mode 100644
index 000000000000..1f312ecef23a
--- /dev/null
+++ b/pkgs/development/libraries/sqlite/archive-version.nix
@@ -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"
diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix
index b8b7d0c701dd..eaeafa741297 100644
--- a/pkgs/development/libraries/sqlite/default.nix
+++ b/pkgs/development/libraries/sqlite/default.nix
@@ -1,21 +1,29 @@
-{ lib, stdenv, fetchurl, interactive ? false, readline ? null, ncurses ? null }:
+{ stdenv, fetchurl, zlib, interactive ? false, readline ? null, ncurses ? null }:
assert interactive -> readline != null && ncurses != null;
-stdenv.mkDerivation {
- name = "sqlite-3.22.0";
+with stdenv.lib;
+let
+ archiveVersion = import ./archive-version.nix stdenv.lib;
+in
+
+stdenv.mkDerivation rec {
+ name = "sqlite-${version}";
+ version = "3.23.1";
+
+ # NB! Make sure to update analyzer.nix src (in the same directory).
src = fetchurl {
- url = "http://sqlite.org/2018/sqlite-autoconf-3220000.tar.gz";
- sha256 = "04n6hnw2g818d7r92cp2608kd5mhzyysy83k29kbq1mp709an918";
+ url = "https://sqlite.org/2018/sqlite-autoconf-${archiveVersion version}.tar.gz";
+ sha256 = "09ggapjhqjb2pzk0wkfczil77plijg3d77m2bpzlwx2y7ql2p14j";
};
outputs = [ "bin" "dev" "out" ];
separateDebugInfo = stdenv.isLinux;
- buildInputs = lib.optionals interactive [ readline ncurses ];
+ buildInputs = [ zlib ] ++ optionals interactive [ readline ncurses ];
- configureFlags = [ "--enable-threadsafe" ] ++ lib.optional interactive "--enable-readline";
+ configureFlags = [ "--enable-threadsafe" ] ++ optional interactive "--enable-readline";
NIX_CFLAGS_COMPILE = [
"-DSQLITE_ENABLE_COLUMN_METADATA"
@@ -59,9 +67,10 @@ stdenv.mkDerivation {
'';
meta = {
- homepage = http://www.sqlite.org/;
description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
- platforms = stdenv.lib.platforms.unix;
- maintainers = with stdenv.lib.maintainers; [ eelco np ];
+ downloadPage = http://sqlite.org/download.html;
+ homepage = http://www.sqlite.org/;
+ maintainers = with maintainers; [ eelco np ];
+ platforms = platforms.unix;
};
}
diff --git a/pkgs/development/libraries/sqlite/sqlite3_analyzer.nix b/pkgs/development/libraries/sqlite/sqlite3_analyzer.nix
deleted file mode 100644
index 1feedb94c158..000000000000
--- a/pkgs/development/libraries/sqlite/sqlite3_analyzer.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ lib, stdenv, fetchurl, unzip, tcl }:
-
-stdenv.mkDerivation {
- name = "sqlite3_analyzer-3.22.0";
-
- src = fetchurl {
- url = "https://www.sqlite.org/2018/sqlite-src-3220000.zip";
- sha256 = "04w97jj1659vl84rr73wg1mhj6by8r5075rzpn2xp42n537a7ibv";
- };
-
- nativeBuildInputs = [ unzip ];
- buildInputs = [ tcl ];
-
- makeFlags = [ "sqlite3_analyzer" ];
-
- installPhase = ''
- install -Dm755 sqlite3_analyzer \
- "$out/bin/sqlite3_analyzer"
- '';
-
- meta = with stdenv.lib; {
- homepage = http://www.sqlite.org/;
- description = "A tool that shows statistics about sqlite databases";
- platforms = platforms.unix;
- maintainers = with maintainers; [ pesterhazy ];
- };
-}