2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, sqlite, tcl, Foundation }:
|
2019-09-19 17:58:50 +00:00
|
|
|
|
|
|
|
let
|
2021-01-21 17:00:13 +00:00
|
|
|
archiveVersion = import ./archive-version.nix lib;
|
2019-09-19 17:58:50 +00:00
|
|
|
mkTool = { pname, makeTarget, description, homepage }: stdenv.mkDerivation rec {
|
|
|
|
inherit pname;
|
2021-10-22 10:46:12 +00:00
|
|
|
version = "3.36.0";
|
2019-09-19 17:58:50 +00:00
|
|
|
|
|
|
|
src = assert version == sqlite.version; fetchurl {
|
2021-01-20 23:47:53 +00:00
|
|
|
url = "https://sqlite.org/2021/sqlite-src-${archiveVersion version}.zip";
|
2021-10-22 10:46:12 +00:00
|
|
|
sha256 = "092khwfm0m0i80sjb4fc5569jj0kilm6pa867w0akcv6h38bk8r5";
|
2019-09-19 17:58:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
2021-01-21 17:00:13 +00:00
|
|
|
buildInputs = [ tcl ] ++ lib.optional stdenv.isDarwin Foundation;
|
2019-09-19 17:58:50 +00:00
|
|
|
|
|
|
|
makeFlags = [ makeTarget ];
|
|
|
|
|
|
|
|
installPhase = "install -Dt $out/bin ${makeTarget}";
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-09-19 17:58:50 +00:00
|
|
|
inherit description homepage;
|
2021-11-10 10:37:56 +00:00
|
|
|
downloadPage = "http://sqlite.org/download.html";
|
2019-09-19 17:58:50 +00:00
|
|
|
license = licenses.publicDomain;
|
2021-05-13 10:57:43 +00:00
|
|
|
maintainers = with maintainers; [ johnazoidberg ];
|
2019-09-19 17:58:50 +00:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|