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;
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "3.42.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 {
|
2023-03-15 16:39:30 +00:00
|
|
|
url = "https://sqlite.org/2023/sqlite-src-${archiveVersion version}.zip";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-OMpWoxe+N/sAvZK8KA2bkgm9QAiyl9SDxB7B9geb+20=";
|
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";
|
|
|
|
description = "A tool that displays the differences between SQLite databases";
|
|
|
|
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";
|
|
|
|
description = "A tool that shows statistics about SQLite databases";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|