2024-05-02 00:46:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, sqlite, tcl, Foundation }:
|
|
|
|
|
|
|
|
let
|
|
|
|
archiveVersion = import ./archive-version.nix lib;
|
2024-05-13 21:24:10 +00:00
|
|
|
mkTool = { pname, makeTarget, description, homepage, mainProgram }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit pname;
|
|
|
|
version = "3.45.2";
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
# nixpkgs-update: no auto update
|
|
|
|
src = assert version == sqlite.version;
|
|
|
|
fetchurl {
|
|
|
|
url =
|
|
|
|
"https://sqlite.org/2024/sqlite-src-${archiveVersion version}.zip";
|
|
|
|
hash = "sha256-SkWjV3zIr2g8S9TG6Bp8eCxbfV2qBhdeosuXHKcWkbE=";
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
buildInputs = [ tcl ] ++ lib.optional stdenv.isDarwin Foundation;
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
makeFlags = [ makeTarget ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
installPhase = "install -Dt $out/bin ${makeTarget}";
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
meta = with lib; {
|
|
|
|
inherit description homepage mainProgram;
|
|
|
|
downloadPage = "http://sqlite.org/download.html";
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
maintainers = with maintainers; [ johnazoidberg ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
};
|
2024-05-13 21:24:10 +00:00
|
|
|
in {
|
2024-05-02 00:46:19 +00:00
|
|
|
sqldiff = mkTool {
|
|
|
|
pname = "sqldiff";
|
|
|
|
makeTarget = "sqldiff";
|
2024-05-13 21:24:10 +00:00
|
|
|
description =
|
|
|
|
"A tool that displays the differences between SQLite databases";
|
2024-05-02 00:46:19 +00:00
|
|
|
homepage = "https://www.sqlite.org/sqldiff.html";
|
|
|
|
mainProgram = "sqldiff";
|
|
|
|
};
|
|
|
|
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";
|
|
|
|
mainProgram = "sqlite3_analyzer";
|
|
|
|
};
|
|
|
|
}
|