Merge pull request #114693 from jojosch/dbeaver-21.0
dbeaver: 7.3.5 -> 21.0.0
This commit is contained in:
commit
c0013a0218
@ -27,13 +27,13 @@ let
|
|||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "dbeaver-ce";
|
pname = "dbeaver-ce";
|
||||||
version = "7.3.5"; # When updating also update fetchedMavenDeps.sha256
|
version = "21.0.0"; # When updating also update fetchedMavenDeps.sha256
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "dbeaver";
|
owner = "dbeaver";
|
||||||
repo = "dbeaver";
|
repo = "dbeaver";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-gEE7rndOaXzruWL7TG+QgVkq1+06tIZwyGzU9cFc+oU=";
|
sha256 = "sha256-it0EcPD7TXSknjVkGv22Nq1D4J32OEncQDy4w9CIPNk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchedMavenDeps = stdenv.mkDerivation {
|
fetchedMavenDeps = stdenv.mkDerivation {
|
||||||
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
|
|||||||
maven
|
maven
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = "mvn package -Dmaven.repo.local=$out/.m2";
|
buildPhase = "mvn package -Dmaven.repo.local=$out/.m2 -P desktop,all-platforms";
|
||||||
|
|
||||||
# keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside
|
# keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
|
|||||||
dontFixup = true;
|
dontFixup = true;
|
||||||
outputHashAlgo = "sha256";
|
outputHashAlgo = "sha256";
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHash = "sha256-jT0Z154rVmafUbb6dqYSl3cUxMuK5MR4HUsprkrgSDw=";
|
outputHash = "sha256-xKlFFQXd2U513KZKQa7ttSFNX2gxVr9hNsvyaoN/rEE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -80,16 +80,30 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mvn package --offline -Dmaven.repo.local=$(cp -dpR ${fetchedMavenDeps}/.m2 ./ && chmod +w -R .m2 && pwd)/.m2
|
runHook preBuild
|
||||||
|
|
||||||
|
mvn package --offline -Dmaven.repo.local=$(cp -dpR ${fetchedMavenDeps}/.m2 ./ && chmod +w -R .m2 && pwd)/.m2 -P desktop,all-platforms
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase =
|
installPhase =
|
||||||
let
|
let
|
||||||
productTargetPath = "product/standalone/target/products/org.jkiss.dbeaver.core.product";
|
productTargetPath = "product/standalone/target/products/org.jkiss.dbeaver.core.product";
|
||||||
|
|
||||||
|
platformMap = {
|
||||||
|
aarch64-linux = "aarch64";
|
||||||
|
x86_64-darwin = "x86_64";
|
||||||
|
x86_64-linux = "x86_64";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemPlatform = platformMap.${stdenv.hostPlatform.system} or (throw "dbeaver not supported on ${stdenv.hostPlatform.system}");
|
||||||
in
|
in
|
||||||
if stdenv.isDarwin then ''
|
if stdenv.isDarwin then ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/Applications $out/bin
|
mkdir -p $out/Applications $out/bin
|
||||||
cp -r ${productTargetPath}/macosx/cocoa/x86_64/DBeaver.app $out/Applications
|
cp -r ${productTargetPath}/macosx/cocoa/${systemPlatform}/DBeaver.app $out/Applications
|
||||||
|
|
||||||
sed -i "/^-vm/d; /bin\/java/d" $out/Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini
|
sed -i "/^-vm/d; /bin\/java/d" $out/Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini
|
||||||
|
|
||||||
@ -98,9 +112,13 @@ stdenv.mkDerivation rec {
|
|||||||
wrapProgram $out/Applications/DBeaver.app/Contents/MacOS/dbeaver \
|
wrapProgram $out/Applications/DBeaver.app/Contents/MacOS/dbeaver \
|
||||||
--prefix JAVA_HOME : ${jdk.home} \
|
--prefix JAVA_HOME : ${jdk.home} \
|
||||||
--prefix PATH : ${jdk}/bin
|
--prefix PATH : ${jdk}/bin
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'' else ''
|
'' else ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/
|
mkdir -p $out/
|
||||||
cp -r ${productTargetPath}/linux/gtk/x86_64/dbeaver $out/dbeaver
|
cp -r ${productTargetPath}/linux/gtk/${systemPlatform}/dbeaver $out/dbeaver
|
||||||
|
|
||||||
# Patch binaries.
|
# Patch binaries.
|
||||||
interpreter=$(cat $NIX_CC/nix-support/dynamic-linker)
|
interpreter=$(cat $NIX_CC/nix-support/dynamic-linker)
|
||||||
@ -117,6 +135,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
mkdir -p $out/share/pixmaps
|
mkdir -p $out/share/pixmaps
|
||||||
ln -s $out/dbeaver/icon.xpm $out/share/pixmaps/dbeaver.xpm
|
ln -s $out/dbeaver/icon.xpm $out/share/pixmaps/dbeaver.xpm
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
@ -129,7 +149,7 @@ stdenv.mkDerivation rec {
|
|||||||
Teradata, Firebird, Derby, etc.
|
Teradata, Firebird, Derby, etc.
|
||||||
'';
|
'';
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
|
||||||
maintainers = with maintainers; [ jojosch ];
|
maintainers = with maintainers; [ jojosch ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user