22 mavenJdk17 = maven.override {
26 mavenJdk17.buildMavenPackage rec {
28 version = "22.2.2"; # When updating also update mvnHash
30 src = fetchFromGitHub {
34 hash = "sha256-TUdtrhQ1JzqZx+QNauNA1P/+WDSSeOGIgGX3SdS0JTI=";
37 mvnHash = "sha256-ERZYDsPxp1YXteSmunFIgTGZUYqjZJhqrNytLnIUNBQ=";
38 mvnParameters = "-P desktop,all-platforms";
55 ] ++ lib.optionals stdenv.isLinux [
65 desktopName = "dbeaver";
66 comment = "SQL Integrated Development Environment";
67 genericName = "SQL Integrated Development Environment";
68 categories = [ "Development" ];
74 productTargetPath = "product/community/target/products/org.jkiss.dbeaver.core.product";
77 aarch64-darwin = "aarch64";
78 aarch64-linux = "aarch64";
79 x86_64-darwin = "x86_64";
80 x86_64-linux = "x86_64";
83 systemPlatform = platformMap.${stdenv.hostPlatform.system} or (throw "dbeaver not supported on ${stdenv.hostPlatform.system}");
85 if stdenv.isDarwin then ''
88 mkdir -p $out/Applications $out/bin
89 cp -r ${productTargetPath}/macosx/cocoa/${systemPlatform}/DBeaver.app $out/Applications
91 sed -i "/^-vm/d; /bin\/java/d" $out/Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini
93 ln -s $out/Applications/DBeaver.app/Contents/MacOS/dbeaver $out/bin/dbeaver
95 wrapProgram $out/Applications/DBeaver.app/Contents/MacOS/dbeaver \
96 --prefix JAVA_HOME : ${jdk17.home} \
97 --prefix PATH : ${jdk17}/bin
104 cp -r ${productTargetPath}/linux/gtk/${systemPlatform}/dbeaver $out/dbeaver
107 interpreter=$(cat $NIX_CC/nix-support/dynamic-linker)
108 patchelf --set-interpreter $interpreter $out/dbeaver/dbeaver
110 makeWrapper $out/dbeaver/dbeaver $out/bin/dbeaver \
111 --prefix PATH : ${jdk17}/bin \
112 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ glib gtk3 libXtst webkitgtk glib-networking ])} \
113 --prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
114 --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
116 mkdir -p $out/share/pixmaps
117 ln -s $out/dbeaver/icon.xpm $out/share/pixmaps/dbeaver.xpm
123 homepage = "https://dbeaver.io/";
124 description = "Universal SQL Client for developers, DBA and analysts. Supports MySQL, PostgreSQL, MariaDB, SQLite, and more";
126 Free multi-platform database tool for developers, SQL programmers, database
127 administrators and analysts. Supports all popular databases: MySQL,
128 PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access,
129 Teradata, Firebird, Derby, etc.
131 sourceProvenance = with sourceTypes; [
133 binaryBytecode # dependencies from maven
135 license = licenses.asl20;
136 platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
137 maintainers = with maintainers; [ jojosch mkg20001 ];
138 mainProgram = "dbeaver";