dbeaver-bin: add .desktop file

This commit is contained in:
Naxdy 2024-05-17 08:19:57 +02:00
parent f467be8e15
commit 1d1f1cdb90
No known key found for this signature in database
GPG Key ID: CC15075846BCE91B

View File

@ -3,13 +3,17 @@
, fetchurl
, makeWrapper
, openjdk17
, gnused
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbeaver-bin";
version = "24.0.4";
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
makeWrapper
gnused
];
src =
let
@ -39,6 +43,19 @@ stdenvNoCC.mkDerivation (finalAttrs: {
makeWrapper $out/opt/dbeaver/dbeaver $out/bin/dbeaver \
--prefix PATH : "${openjdk17}/bin" \
--set JAVA_HOME "${openjdk17.home}"
mkdir -p $out/share/icons/hicolor/256x256/apps
ln -s $out/opt/dbeaver/dbeaver.png $out/share/icons/hicolor/256x256/apps/dbeaver.png
mkdir -p $out/share/applications
ln -s $out/opt/dbeaver/dbeaver-ce.desktop $out/share/applications/dbeaver.desktop
substituteInPlace $out/opt/dbeaver/dbeaver-ce.desktop \
--replace-fail "/usr/share/dbeaver-ce/dbeaver.png" "dbeaver" \
--replace-fail "/usr/share/dbeaver-ce/dbeaver" "$out/bin/dbeaver"
sed -i '/^Path=/d' $out/share/applications/dbeaver.desktop
runHook postInstall
'';