at v206 941 B view raw
1{ lib, stdenv, fetchurl, unzip, tcl }: 2 3stdenv.mkDerivation { 4 name = "sqlite3_analzer-3.8.10.1"; 5 6 src = fetchurl { 7 url = "https://www.sqlite.org/2015/sqlite-src-3081001.zip"; 8 sha1 = "6z7w8y69jxr0xwxbhs8z3zf56zfs5x7z"; 9 }; 10 11 buildInputs = [ unzip tcl ]; 12 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 ''; 23 24 installPhase = '' 25 mkdir -p "$out/bin" 26 mv sqlite3_analyzer "$out/bin" 27 ''; 28 29 meta = { 30 homepage = http://www.sqlite.org/; 31 description = "A tool that shows statistics about sqlite databases"; 32 platforms = stdenv.lib.platforms.unix; 33 maintainers = with stdenv.lib.maintainers; [ pesterhazy ]; 34 }; 35}