2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchurl, unzip, sqlite, tcl, Foundation }:
|
2019-09-19 19:58:50 +02:00
|
|
|
|
|
|
|
let
|
2021-01-21 18:00:13 +01:00
|
|
|
archiveVersion = import ./archive-version.nix lib;
|
2022-05-05 02:52:27 +02:00
|
|
|
mkTool = { pname, makeTarget, description, homepage, mainProgram }: stdenv.mkDerivation rec {
|
2019-09-19 19:58:50 +02:00
|
|
|
inherit pname;
|
2024-03-13 09:02:59 +01:00
|
|
|
version = "3.45.2";
|
2019-09-19 19:58:50 +02:00
|
|
|
|
2022-01-01 04:37:26 +01:00
|
|
|
# nixpkgs-update: no auto update
|
2019-09-19 19:58:50 +02:00
|
|
|
src = assert version == sqlite.version; fetchurl {
|
2024-01-16 12:49:40 +01:00
|
|
|
url = "https://sqlite.org/2024/sqlite-src-${archiveVersion version}.zip";
|
2024-03-13 09:02:59 +01:00
|
|
|
hash = "sha256-SkWjV3zIr2g8S9TG6Bp8eCxbfV2qBhdeosuXHKcWkbE=";
|
2019-09-19 19:58:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
2021-01-21 18:00:13 +01:00
|
|
|
buildInputs = [ tcl ] ++ lib.optional stdenv.isDarwin Foundation;
|
2019-09-19 19:58:50 +02:00
|
|
|
|
|
|
|
makeFlags = [ makeTarget ];
|
|
|
|
|
|
|
|
installPhase = "install -Dt $out/bin ${makeTarget}";
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2022-05-05 02:52:27 +02:00
|
|
|
inherit description homepage mainProgram;
|
2021-11-10 11:37:56 +01:00
|
|
|
downloadPage = "http://sqlite.org/download.html";
|
2019-09-19 19:58:50 +02:00
|
|
|
license = licenses.publicDomain;
|
2021-05-13 12:57:43 +02:00
|
|
|
maintainers = with maintainers; [ johnazoidberg ];
|
2019-09-19 19:58:50 +02: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-05 02:52:27 +02:00
|
|
|
mainProgram = "sqldiff";
|
2019-09-19 19:58:50 +02: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-05 02:52:27 +02:00
|
|
|
mainProgram = "sqlite3_analyzer";
|
2019-09-19 19:58:50 +02:00
|
|
|
};
|
|
|
|
}
|