diff options
author | Paulus Esterhazy <pesterhazy@gmail.com> | 2015-05-20 15:54:18 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-05-21 13:57:53 +0200 |
commit | c4a8acd9839c10016a16ddf5dd4c01672a6f0ce9 (patch) | |
tree | 81ac269b798193d55d7ef6dd1e7fb1c2728a173c /pkgs/development | |
parent | 7808efe5b7c9abd89d3977825f7115f0a39a5771 (diff) |
Add sqlite3_analyzer
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/sqlite/sqlite3_analyzer.nix | 35 |
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 0000000000000..4e5d360aea04e --- /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 ]; + }; +} |