about summary refs log tree commit diff
path: root/pkgs/development/libraries/sqlite/sqlite3_analyzer.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-22 15:57:36 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-22 15:57:36 +0200
commit09d06f5ffd867afc72d5ca6786f73aed2b80e207 (patch)
tree0b39699b6fae1ea7f5e6b40b2214c901eb9a578b /pkgs/development/libraries/sqlite/sqlite3_analyzer.nix
parentf106125f77ba2b3588f95ef58667763042f808c9 (diff)
parenta49afdf1743436ac07c9be9da1d27ea5461af571 (diff)
downloadnixlib-09d06f5ffd867afc72d5ca6786f73aed2b80e207.tar
nixlib-09d06f5ffd867afc72d5ca6786f73aed2b80e207.tar.gz
nixlib-09d06f5ffd867afc72d5ca6786f73aed2b80e207.tar.bz2
nixlib-09d06f5ffd867afc72d5ca6786f73aed2b80e207.tar.lz
nixlib-09d06f5ffd867afc72d5ca6786f73aed2b80e207.tar.xz
nixlib-09d06f5ffd867afc72d5ca6786f73aed2b80e207.tar.zst
nixlib-09d06f5ffd867afc72d5ca6786f73aed2b80e207.zip
Merge remote-tracking branch 'origin/master' into systemd-219
Conflicts:
	pkgs/development/libraries/libseccomp/default.nix
Diffstat (limited to 'pkgs/development/libraries/sqlite/sqlite3_analyzer.nix')
-rw-r--r--pkgs/development/libraries/sqlite/sqlite3_analyzer.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/development/libraries/sqlite/sqlite3_analyzer.nix b/pkgs/development/libraries/sqlite/sqlite3_analyzer.nix
new file mode 100644
index 000000000000..4e5d360aea04
--- /dev/null
+++ b/pkgs/development/libraries/sqlite/sqlite3_analyzer.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, unzip, tcl }:
+
+stdenv.mkDerivation {
+  name = "sqlite3_analzer-3.8.10.1";
+
+  src = fetchurl {
+    url = "https://www.sqlite.org/2015/sqlite-src-3081001.zip";
+    sha1 = "6z7w8y69jxr0xwxbhs8z3zf56zfs5x7z";
+  };
+
+  buildInputs = [ unzip tcl ];
+
+  # A bug in the latest release of sqlite3 prevents bulding sqlite3_analyzer.
+  # Hopefully this work-around can be removed for future releases.
+  postConfigure = ''
+    substituteInPlace Makefile \
+      --replace '"#define SQLITE_ENABLE_DBSTAT_VTAB"' '"#define SQLITE_ENABLE_DBSTAT_VTAB 1"'
+  '';
+
+  buildPhase = ''
+    make sqlite3_analyzer
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    mv sqlite3_analyzer "$out/bin"
+  '';
+
+  meta = {
+    homepage = http://www.sqlite.org/;
+    description = "A tool that shows statistics about sqlite databases";
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ pesterhazy ];
+  };
+}