2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, sqlite, tcl, Foundation }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
let
|
2021-02-05 17:12:51 +00:00
|
|
|
archiveVersion = import ./archive-version.nix lib;
|
2022-05-18 14:49:53 +00:00
|
|
|
mkTool = { pname, makeTarget, description, homepage, mainProgram }: stdenv.mkDerivation rec {
|
2020-09-25 04:45:31 +00:00
|
|
|
inherit pname;
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "3.46.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
# nixpkgs-update: no auto update
|
2020-09-25 04:45:31 +00:00
|
|
|
src = assert version == sqlite.version; fetchurl {
|
2024-02-29 20:09:43 +00:00
|
|
|
url = "https://sqlite.org/2024/sqlite-src-${archiveVersion version}.zip";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-BwNiEJvraJn2V5dXG5i4gkyPQ39bKSb4juBo2Y7zaOw=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = [ tcl ] ++ lib.optional stdenv.isDarwin Foundation;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
makeFlags = [ makeTarget ];
|
|
|
|
|
|
|
|
installPhase = "install -Dt $out/bin ${makeTarget}";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit description homepage mainProgram;
|
2021-12-06 16:07:01 +00:00
|
|
|
downloadPage = "http://sqlite.org/download.html";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.publicDomain;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ johnazoidberg ];
|
2020-09-25 04:45:31 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
sqldiff = mkTool {
|
|
|
|
pname = "sqldiff";
|
|
|
|
makeTarget = "sqldiff";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool that displays the differences between SQLite databases";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://www.sqlite.org/sqldiff.html";
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "sqldiff";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
sqlite-analyzer = mkTool {
|
|
|
|
pname = "sqlite-analyzer";
|
|
|
|
makeTarget = "sqlite3_analyzer";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool that shows statistics about SQLite databases";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://www.sqlite.org/sqlanalyze.html";
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "sqlite3_analyzer";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|