2019-09-20 09:19:04 +03:00
|
|
|
{ stdenv, fetchurl, unzip, sqlite, tcl, Foundation }:
|
2019-09-19 20:58:50 +03:00
|
|
|
|
|
|
|
let
|
|
|
|
archiveVersion = import ./archive-version.nix stdenv.lib;
|
|
|
|
mkTool = { pname, makeTarget, description, homepage }: stdenv.mkDerivation rec {
|
|
|
|
inherit pname;
|
2020-12-02 11:27:57 +03:00
|
|
|
version = "3.34.0";
|
2019-09-19 20:58:50 +03:00
|
|
|
|
|
|
|
src = assert version == sqlite.version; fetchurl {
|
2020-09-19 18:11:50 +03:00
|
|
|
url = "https://sqlite.org/2020/sqlite-src-${archiveVersion version}.zip";
|
2020-12-02 11:27:57 +03:00
|
|
|
sha256 = "0giklai05shqalj1wwadi9hg5dx6vff8nrblqh9xxljnrq701hm5";
|
2019-09-19 20:58:50 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
2019-09-20 09:19:04 +03:00
|
|
|
buildInputs = [ tcl ] ++ stdenv.lib.optional stdenv.isDarwin Foundation;
|
2019-09-19 20:58:50 +03:00
|
|
|
|
|
|
|
makeFlags = [ makeTarget ];
|
|
|
|
|
|
|
|
installPhase = "install -Dt $out/bin ${makeTarget}";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
inherit description homepage;
|
|
|
|
downloadPage = http://sqlite.org/download.html;
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
maintainers = with maintainers; [ pesterhazy johnazoidberg ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
sqldiff = mkTool {
|
|
|
|
pname = "sqldiff";
|
|
|
|
makeTarget = "sqldiff";
|
|
|
|
description = "A tool that displays the differences between SQLite databases";
|
|
|
|
homepage = "https://www.sqlite.org/sqldiff.html";
|
|
|
|
};
|
|
|
|
sqlite-analyzer = mkTool {
|
|
|
|
pname = "sqlite-analyzer";
|
|
|
|
makeTarget = "sqlite3_analyzer";
|
|
|
|
description = "A tool that shows statistics about SQLite databases";
|
|
|
|
homepage = "https://www.sqlite.org/sqlanalyze.html";
|
|
|
|
};
|
|
|
|
}
|