dbeaver-bin: wrap program to find openjdk17

This commit is contained in:
Naxdy 2024-05-17 08:11:52 +02:00
parent 9c253cdf5e
commit f467be8e15
No known key found for this signature in database
GPG Key ID: CC15075846BCE91B

View File

@ -1,12 +1,16 @@
{ lib
, stdenvNoCC
, fetchurl
, makeWrapper
, openjdk17
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbeaver-bin";
version = "24.0.4";
nativeBuildInputs = [ makeWrapper ];
src =
let
inherit (stdenvNoCC.hostPlatform) system;
@ -32,7 +36,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook preInstall
mkdir -p $out/opt/dbeaver $out/bin
cp -r * $out/opt/dbeaver
ln -s $out/opt/dbeaver/dbeaver $out/bin/dbeaver
makeWrapper $out/opt/dbeaver/dbeaver $out/bin/dbeaver \
--prefix PATH : "${openjdk17}/bin" \
--set JAVA_HOME "${openjdk17.home}"
runHook postInstall
'';