depot/third_party/nixpkgs/pkgs/development/libraries/sqlite/tools.nix
Default email b6d97fd731 Project import generated by Copybara.
GitOrigin-RevId: be0b453d7c7eee2090962c9a83749b024ff9acf5
2020-12-25 14:55:36 +01:00

43 lines
1.4 KiB
Nix

{ stdenv, fetchurl, unzip, sqlite, tcl, Foundation }:
let
archiveVersion = import ./archive-version.nix stdenv.lib;
mkTool = { pname, makeTarget, description, homepage }: stdenv.mkDerivation rec {
inherit pname;
version = "3.34.0";
src = assert version == sqlite.version; fetchurl {
url = "https://sqlite.org/2020/sqlite-src-${archiveVersion version}.zip";
sha256 = "0giklai05shqalj1wwadi9hg5dx6vff8nrblqh9xxljnrq701hm5";
};
nativeBuildInputs = [ unzip ];
buildInputs = [ tcl ] ++ stdenv.lib.optional stdenv.isDarwin Foundation;
makeFlags = [ makeTarget ];
installPhase = "install -Dt $out/bin ${makeTarget}";
meta = with stdenv.lib; {
inherit description homepage;
downloadPage = http://sqlite.org/download.html;
license = licenses.publicDomain;
maintainers = with maintainers; [ pesterhazy johnazoidberg ];
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";
};
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";
};
}