mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 11:02:05 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
74 lines
2.2 KiB
Nix
74 lines
2.2 KiB
Nix
{ lib, stdenv, fetchurl, makeDesktopItem, makeWrapper
|
|
, fontconfig, freetype, glib, gtk3
|
|
, jdk, libX11, libXrender, libXtst, zlib }:
|
|
|
|
# The build process is almost like eclipse's.
|
|
# See `pkgs/applications/editors/eclipse/*.nix`
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dbeaver-ce";
|
|
version = "7.3.2";
|
|
|
|
desktopItem = makeDesktopItem {
|
|
name = "dbeaver";
|
|
exec = "dbeaver";
|
|
icon = "dbeaver";
|
|
desktopName = "dbeaver";
|
|
comment = "SQL Integrated Development Environment";
|
|
genericName = "SQL Integrated Development Environment";
|
|
categories = "Development;";
|
|
};
|
|
|
|
buildInputs = [
|
|
fontconfig freetype glib gtk3
|
|
jdk libX11 libXrender libXtst zlib
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
];
|
|
|
|
src = fetchurl {
|
|
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
|
|
sha256 = "sha256-4BVXcR8/E4uIrPQJe9KU9577j4XLTxJWTO8g0vCHWts=";
|
|
};
|
|
|
|
installPhase = ''
|
|
# remove bundled jre
|
|
rm -rf jre
|
|
|
|
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 \
|
|
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath ([ glib gtk3 libXtst ])} \
|
|
--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 lib; {
|
|
homepage = "https://dbeaver.io/";
|
|
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" ];
|
|
maintainers = [ maintainers.jojosch ];
|
|
};
|
|
}
|