2018-01-08 23:22:32 +00:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem, makeWrapper
|
2019-04-14 18:22:40 +01:00
|
|
|
, fontconfig, freetype, glib, gtk3
|
2018-01-08 23:22:32 +00:00
|
|
|
, jdk, libX11, libXrender, libXtst, zlib }:
|
|
|
|
|
|
|
|
# The build process is almost like eclipse's.
|
|
|
|
# See `pkgs/applications/editors/eclipse/*.nix`
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dbeaver-ce";
|
2020-08-31 07:51:48 +01:00
|
|
|
version = "7.2.0";
|
2018-01-08 23:22:32 +00:00
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "dbeaver";
|
|
|
|
exec = "dbeaver";
|
|
|
|
icon = "dbeaver";
|
|
|
|
desktopName = "dbeaver";
|
|
|
|
comment = "SQL Integrated Development Environment";
|
|
|
|
genericName = "SQL Integrated Development Environment";
|
2020-06-25 03:18:37 +01:00
|
|
|
categories = "Development;";
|
2018-01-08 23:22:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2019-04-14 18:22:40 +01:00
|
|
|
fontconfig freetype glib gtk3
|
2018-01-08 23:22:32 +00:00
|
|
|
jdk libX11 libXrender libXtst zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-05-14 03:28:51 +01:00
|
|
|
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
|
2020-08-31 07:51:48 +01:00
|
|
|
sha256 = "0zpxsdzhn5fsrlq04v5kvkrgf4dsj5zmpypj9awsd2mjcbp6yxd7";
|
2018-01-08 23:22:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/
|
|
|
|
cp -r . $out/dbeaver
|
|
|
|
|
|
|
|
# Patch binaries.
|
|
|
|
interpreter=$(cat $NIX_CC/nix-support/dynamic-linker)
|
|
|
|
patchelf --set-interpreter $interpreter $out/dbeaver/dbeaver
|
|
|
|
|
|
|
|
makeWrapper $out/dbeaver/dbeaver $out/bin/dbeaver \
|
|
|
|
--prefix PATH : ${jdk}/bin \
|
2019-04-14 18:22:40 +01:00
|
|
|
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath ([ glib gtk3 libXtst ])} \
|
2018-01-08 23:22:32 +00:00
|
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
|
|
|
|
|
|
|
|
# Create desktop item.
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp ${desktopItem}/share/applications/* $out/share/applications
|
|
|
|
|
|
|
|
mkdir -p $out/share/pixmaps
|
|
|
|
ln -s $out/dbeaver/icon.xpm $out/share/pixmaps/dbeaver.xpm
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-03-23 09:05:32 +00:00
|
|
|
homepage = "https://dbeaver.io/";
|
2018-01-08 23:22:32 +00:00
|
|
|
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.
|
|
|
|
'';
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2019-09-03 11:33:01 +01:00
|
|
|
maintainers = [ maintainers.jojosch ];
|
2018-01-08 23:22:32 +00:00
|
|
|
};
|
|
|
|
}
|