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-U1KJxE1PzRRMvYw3jSYV2n6JuhzyL30le1HeY0kft1k=";
34 aarch64-linux = "sha256-AT/Xx+Hwu64sUfR1fS9nI+RTsIfdi9udF9TR9hbjnxg=";
35 x86_64-darwin = "sha256-hCIfBv6FaNoZiTvpx1UCdwBg15vq+ZsTG5upmbWXN0M=";
36 aarch64-darwin = "sha256-g0G6fqR75AoOEzlYr6MbTBL8aQ/hWQuFyw1G2w9/JlU=";
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 if !stdenvNoCC.hostPlatform.isDarwin then
63 mkdir -p $out/opt/dbeaver $out/bin
64 cp -r * $out/opt/dbeaver
65 makeWrapper $out/opt/dbeaver/dbeaver $out/bin/dbeaver \
66 --prefix PATH : "${openjdk17}/bin" \
67 --set JAVA_HOME "${openjdk17.home}" \
68 --prefix CLASSPATH : "$out/dbeaver/plugins/*:${swt}/jars/swt.jar" \
69 --prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
70 --prefix LD_LIBRARY_PATH : "$out/lib:${
80 mkdir -p $out/share/icons/hicolor/256x256/apps
81 ln -s $out/opt/dbeaver/dbeaver.png $out/share/icons/hicolor/256x256/apps/dbeaver.png
83 mkdir -p $out/share/applications
84 ln -s $out/opt/dbeaver/dbeaver-ce.desktop $out/share/applications/dbeaver.desktop
86 substituteInPlace $out/opt/dbeaver/dbeaver-ce.desktop \
87 --replace-fail "/usr/share/dbeaver-ce/dbeaver.png" "dbeaver" \
88 --replace-fail "/usr/share/dbeaver-ce/dbeaver" "$out/bin/dbeaver"
90 sed -i '/^Path=/d' $out/share/applications/dbeaver.desktop
98 mkdir -p $out/{Applications/dbeaver.app,bin}
99 cp -R . $out/Applications/dbeaver.app
100 makeWrapper $out/{Applications/dbeaver.app/Contents/MacOS,bin}/dbeaver \
101 --prefix PATH : "${openjdk17}/bin" \
102 --set JAVA_HOME "${openjdk17.home}"
107 passthru.updateScript = ./update.sh;
110 homepage = "https://dbeaver.io/";
111 description = "Universal SQL Client for developers, DBA and analysts. Supports MySQL, PostgreSQL, MariaDB, SQLite, and more";
113 Free multi-platform database tool for developers, SQL programmers, database
114 administrators and analysts. Supports all popular databases: MySQL,
115 PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access,
116 Teradata, Firebird, Derby, etc.
118 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
119 license = licenses.asl20;
120 platforms = platforms.linux ++ platforms.darwin;
121 maintainers = with maintainers; [
126 mainProgram = "dbeaver";