2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
undmg,
|
|
|
|
appimageTools,
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "dbgate";
|
2024-06-24 18:47:55 +00:00
|
|
|
version = "5.3.1";
|
2024-06-05 15:53:02 +00:00
|
|
|
src =
|
|
|
|
fetchurl
|
|
|
|
{
|
|
|
|
aarch64-linux = {
|
|
|
|
url = "https://github.com/dbgate/dbgate/releases/download/v${version}/dbgate-${version}-linux_arm64.AppImage";
|
2024-06-24 18:47:55 +00:00
|
|
|
hash = "sha256-Qz0VA2pHT8muw9RdLg7Y3w3mJ3ubFnqf4dmfdZdnJHI=";
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
|
|
|
x86_64-linux = {
|
|
|
|
url = "https://github.com/dbgate/dbgate/releases/download/v${version}/dbgate-${version}-linux_x86_64.AppImage";
|
2024-06-24 18:47:55 +00:00
|
|
|
hash = "sha256-H/2Tb6ZnO6LJx+rv/ADdItaRMP95x4G3lPNK0sbZn9I=";
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
|
|
|
x86_64-darwin = {
|
|
|
|
url = "https://github.com/dbgate/dbgate/releases/download/v${version}/dbgate-${version}-mac_x64.dmg";
|
2024-06-24 18:47:55 +00:00
|
|
|
hash = "sha256-gZrfv9qe2arytVgiYtX9uwfwC4Z30SHEDiBUXcpF968=";
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
.${stdenv.system} or (throw "dbgate: ${stdenv.system} is unsupported.");
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = {
|
|
|
|
description = "Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others";
|
|
|
|
homepage = "https://dbgate.org/";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
|
|
|
|
changelog = "https://github.com/dbgate/dbgate/releases/tag/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
mainProgram = "dbgate";
|
|
|
|
platforms = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
2024-06-20 14:57:18 +00:00
|
|
|
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
if stdenv.isDarwin then
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
meta
|
|
|
|
;
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ undmg ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp -r *.app $out/Applications
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
appimageTools.wrapType2 {
|
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
meta
|
|
|
|
;
|
|
|
|
}
|