diff --git a/pkgs/by-name/db/dbeaver-bin/package.nix b/pkgs/by-name/db/dbeaver-bin/package.nix new file mode 100644 index 000000000000..04bdf0e82549 --- /dev/null +++ b/pkgs/by-name/db/dbeaver-bin/package.nix @@ -0,0 +1,54 @@ +{ lib +, stdenvNoCC +, fetchurl +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "dbeaver-bin"; + version = "24.0.4"; + + src = + let + inherit (stdenvNoCC.hostPlatform) system; + selectSystem = attrs: attrs.${system} or (throw "Unsupported system: ${system}"); + suffix = selectSystem { + x86_64-linux = "linux.gtk.x86_64-nojdk.tar.gz"; + aarch64-linux = "linux.gtk.aarch64-nojdk.tar.gz"; + }; + hash = selectSystem { + x86_64-linux = "sha256-sRXfEXTZNHJqBIwHGvYJUoa20qH7KLjygGP7uoaxT1M="; + aarch64-linux = "sha256-CQg2+p1P+Bg1uFM1PMTWtweS0TNElXTP7tI7D5WxixM="; + }; + in + fetchurl { + url = "https://github.com/dbeaver/dbeaver/releases/download/${finalAttrs.version}/dbeaver-ce-${finalAttrs.version}-${suffix}"; + inherit hash; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/usr/share/dbeaver $out/bin + cp -r * $out/usr/share/dbeaver + ln -s $out/usr/share/dbeaver/dbeaver $out/bin/dbeaver + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://dbeaver.io/"; + description = "Universal SQL Client for developers, DBA and analysts. Supports MySQL, PostgreSQL, MariaDB, SQLite, and more"; + longDescription = '' + Free multi-platform database tool for developers, SQL programmers, database + administrators and analysts. Supports all popular databases: MySQL, + PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access, + Teradata, Firebird, Derby, etc. + ''; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ gepbird mkg20001 ]; + mainProgram = "dbeaver"; + }; +})