You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.nix 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. { stdenv, fetchurl, makeDesktopItem, makeWrapper
  2. , fontconfig, freetype, glib, gtk3
  3. , jdk, libX11, libXrender, libXtst, zlib }:
  4. # The build process is almost like eclipse's.
  5. # See `pkgs/applications/editors/eclipse/*.nix`
  6. stdenv.mkDerivation rec {
  7. pname = "dbeaver-ce";
  8. version = "6.2.2";
  9. desktopItem = makeDesktopItem {
  10. name = "dbeaver";
  11. exec = "dbeaver";
  12. icon = "dbeaver";
  13. desktopName = "dbeaver";
  14. comment = "SQL Integrated Development Environment";
  15. genericName = "SQL Integrated Development Environment";
  16. categories = "Application;Development;";
  17. };
  18. buildInputs = [
  19. fontconfig freetype glib gtk3
  20. jdk libX11 libXrender libXtst zlib
  21. ];
  22. nativeBuildInputs = [
  23. makeWrapper
  24. ];
  25. src = fetchurl {
  26. url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
  27. sha256 = "0qpa0wh5lr5lxk9cdv5p1cmbdk1kw1lfqmsfgqxvgfysc1mgjgp1";
  28. };
  29. installPhase = ''
  30. mkdir -p $out/
  31. cp -r . $out/dbeaver
  32. # Patch binaries.
  33. interpreter=$(cat $NIX_CC/nix-support/dynamic-linker)
  34. patchelf --set-interpreter $interpreter $out/dbeaver/dbeaver
  35. makeWrapper $out/dbeaver/dbeaver $out/bin/dbeaver \
  36. --prefix PATH : ${jdk}/bin \
  37. --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath ([ glib gtk3 libXtst ])} \
  38. --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
  39. # Create desktop item.
  40. mkdir -p $out/share/applications
  41. cp ${desktopItem}/share/applications/* $out/share/applications
  42. mkdir -p $out/share/pixmaps
  43. ln -s $out/dbeaver/icon.xpm $out/share/pixmaps/dbeaver.xpm
  44. '';
  45. meta = with stdenv.lib; {
  46. homepage = https://dbeaver.io/;
  47. description = "Universal SQL Client for developers, DBA and analysts. Supports MySQL, PostgreSQL, MariaDB, SQLite, and more";
  48. longDescription = ''
  49. Free multi-platform database tool for developers, SQL programmers, database
  50. administrators and analysts. Supports all popular databases: MySQL,
  51. PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access,
  52. Teradata, Firebird, Derby, etc.
  53. '';
  54. license = licenses.asl20;
  55. platforms = [ "x86_64-linux" ];
  56. maintainers = [ maintainers.jojosch ];
  57. };
  58. }