@@ -1,35 +1,27 @@
11{ lib, stdenv, fetchurl, unzip, tcl }:
22
33stdenv.mkDerivation {
4− name = "sqlite3_analyzer-3.8.10.1";
4+ name = "sqlite3_analyzer-3.17.0";
55
66 src = fetchurl {
7− url = "https://www.sqlite.org/2015/sqlite-src-3081001.zip";
8− sha1 = "6z7w8y69jxr0xwxbhs8z3zf56zfs5x7z";
7+ url = "https://www.sqlite.org/2017/sqlite-src-3170000.zip";
8+ sha256 = "1hs8nzk2pjr4fhhrwcyqwpa24gd4ndp6f0japykg5wfadgp4nxc6";
99 };
1010
11− buildInputs = [ unzip tcl ];
11+ nativeBuildInputs = [ unzip ];
12+ buildInputs = [ tcl ];
1213
13− # A bug in the latest release of sqlite3 prevents bulding sqlite3_analyzer.
14− # Hopefully this work-around can be removed for future releases.
15− postConfigure = ''
16− substituteInPlace Makefile \
17− --replace '"#define SQLITE_ENABLE_DBSTAT_VTAB"' '"#define SQLITE_ENABLE_DBSTAT_VTAB 1"'
18− '';
19−
20− buildPhase = ''
21− make sqlite3_analyzer
22− '';
14+ makeFlags = [ "sqlite3_analyzer" ];
2315
2416 installPhase = ''
25− mkdir -p "$out/bin"
26− mv sqlite3_analyzer "$out/bin"
17+ install -Dm755 sqlite3_analyzer \
18+ "$out/bin/sqlite3_analyzer"
2719 '';
2820
29− meta = {
21+ meta = with stdenv.lib; {
3022 homepage = http://www.sqlite.org/;
3123 description = "A tool that shows statistics about sqlite databases";
32− platforms = stdenv.lib.platforms.unix;
33− maintainers = with stdenv.lib.maintainers; [ pesterhazy ];
24+ platforms = platforms.unix;
25+ maintainers = with maintainers; [ pesterhazy ];
3426 };
3527}