15 override_xmx ? "1024m",
18 stdenvNoCC.mkDerivation (finalAttrs: {
19 pname = "dbeaver-bin";
24 inherit (stdenvNoCC.hostPlatform) system;
25 selectSystem = attrs: attrs.${system} or (throw "Unsupported system: ${system}");
26 suffix = selectSystem {
27 x86_64-linux = "linux.gtk.x86_64-nojdk.tar.gz";
28 aarch64-linux = "linux.gtk.aarch64-nojdk.tar.gz";
29 x86_64-darwin = "macos-x86_64.dmg";
30 aarch64-darwin = "macos-aarch64.dmg";
33 x86_64-linux = "sha256-TvDpoEcnZBS8ORggFwLM80FXsJ8EXKvRSPUn+VtNTk8=";
34 aarch64-linux = "sha256-59khU3VQzpNeZv69pbeeE4ZAFajyI5gUUw9baOWPIFM=";
35 x86_64-darwin = "sha256-/YyN5daeoxq0oii6qYRpZ8cb43u6n8HuVc2JqVOhrxs=";
36 aarch64-darwin = "sha256-Stb76QpLnpmpBYDm+6fgkcx+TlY8hVkNtvGgdMWbaHg=";
40 url = "https://github.com/dbeaver/dbeaver/releases/download/${finalAttrs.version}/dbeaver-ce-${finalAttrs.version}-${suffix}";
44 sourceRoot = lib.optional stdenvNoCC.hostPlatform.isDarwin "DBeaver.app";
48 ++ lib.optionals (!stdenvNoCC.hostPlatform.isDarwin) [
53 ++ lib.optionals stdenvNoCC.hostPlatform.isDarwin [ undmg ];
59 substituteInPlace ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}dbeaver.ini \
60 --replace-fail '-Xmx1024m' '-Xmx${override_xmx}'
64 if !stdenvNoCC.hostPlatform.isDarwin then
68 mkdir -p $out/opt/dbeaver $out/bin
69 cp -r * $out/opt/dbeaver
70 makeWrapper $out/opt/dbeaver/dbeaver $out/bin/dbeaver \
71 --prefix PATH : "${openjdk17}/bin" \
72 --set JAVA_HOME "${openjdk17.home}" \
73 --prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
74 --prefix LD_LIBRARY_PATH : "$out/lib:${
83 mkdir -p $out/share/icons/hicolor/256x256/apps
84 ln -s $out/opt/dbeaver/dbeaver.png $out/share/icons/hicolor/256x256/apps/dbeaver.png
86 mkdir -p $out/share/applications
87 ln -s $out/opt/dbeaver/dbeaver-ce.desktop $out/share/applications/dbeaver.desktop
89 substituteInPlace $out/opt/dbeaver/dbeaver-ce.desktop \
90 --replace-fail "/usr/share/dbeaver-ce/dbeaver.png" "dbeaver" \
91 --replace-fail "/usr/share/dbeaver-ce/dbeaver" "$out/bin/dbeaver"
93 sed -i '/^Path=/d' $out/share/applications/dbeaver.desktop
101 mkdir -p $out/{Applications/dbeaver.app,bin}
102 cp -R . $out/Applications/dbeaver.app
103 makeWrapper $out/{Applications/dbeaver.app/Contents/MacOS,bin}/dbeaver \
104 --prefix PATH : "${openjdk17}/bin" \
105 --set JAVA_HOME "${openjdk17.home}"
110 passthru.updateScript = ./update.sh;
113 homepage = "https://dbeaver.io/";
114 description = "Universal SQL Client for developers, DBA and analysts. Supports MySQL, PostgreSQL, MariaDB, SQLite, and more";
116 Free multi-platform database tool for developers, SQL programmers, database
117 administrators and analysts. Supports all popular databases: MySQL,
118 PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access,
119 Teradata, Firebird, Derby, etc.
121 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
122 license = licenses.asl20;
123 platforms = platforms.linux ++ platforms.darwin;
124 maintainers = with maintainers; [
129 mainProgram = "dbeaver";