nixpkgs/pkgs/development/libraries/sqlite/tools.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, unzip, sqlite, tcl, Foundation }:
2019-09-19 18:58:50 +01:00
let
archiveVersion = import ./archive-version.nix lib;
mkTool = { pname, makeTarget, description, homepage, mainProgram }: stdenv.mkDerivation rec {
2019-09-19 18:58:50 +01:00
inherit pname;
version = "3.39.0";
2019-09-19 18:58:50 +01:00
# nixpkgs-update: no auto update
2019-09-19 18:58:50 +01:00
src = assert version == sqlite.version; fetchurl {
2022-01-01 03:37:26 +00:00
url = "https://sqlite.org/2022/sqlite-src-${archiveVersion version}.zip";
sha256 = "sha256-s1hfN90Qbbs9RsjBei0nX5pLh9+MRQm9LWpbQAMkJuY=";
2019-09-19 18:58:50 +01:00
};
nativeBuildInputs = [ unzip ];
buildInputs = [ tcl ] ++ lib.optional stdenv.isDarwin Foundation;
2019-09-19 18:58:50 +01:00
makeFlags = [ makeTarget ];
installPhase = "install -Dt $out/bin ${makeTarget}";
meta = with lib; {
inherit description homepage mainProgram;
downloadPage = "http://sqlite.org/download.html";
2019-09-19 18:58:50 +01:00
license = licenses.publicDomain;
maintainers = with maintainers; [ johnazoidberg ];
2019-09-19 18:58:50 +01: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";
mainProgram = "sqldiff";
2019-09-19 18:58:50 +01: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";
mainProgram = "sqlite3_analyzer";
2019-09-19 18:58:50 +01:00
};
}