Merge pull request #166063 from jojosch/dbeaver-fix

This commit is contained in:
Sandro 2022-03-30 00:10:18 +02:00 committed by GitHub
commit 78e7a97c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 31 deletions

View File

@ -19,9 +19,11 @@
, javaPackages
}:
javaPackages.mavenfod rec {
(javaPackages.mavenfod.override {
inherit maven; # use overridden maven version (see dbeaver's entry in all-packages.nix)
}) rec {
pname = "dbeaver";
version = "22.0.1"; # When updating also update fetchedMavenDeps.sha256
version = "22.0.1"; # When updating also update mvnSha256
src = fetchFromGitHub {
owner = "dbeaver";
@ -30,36 +32,9 @@ javaPackages.mavenfod rec {
sha256 = "sha256-IG5YWwq3WVzQBvAslQ9Z2Ou6ADzf4n9NkQCtH4Jgkac=";
};
mvnSha256 = "7Sm1hAoi5xc4MLONOD8ySLLkpao0qmlMRRva/8zR210=";
mvnSha256 = "WAB15d4UvUOkBXT7K/hvAZWOE3V1Lpl/tr+AFNBM4FI=";
mvnParameters = "-P desktop,all-platforms";
fetchedMavenDeps = stdenv.mkDerivation {
name = "dbeaver-${version}-maven-deps";
inherit src;
buildInputs = [
maven
];
buildPhase = "mvn package -Dmaven.repo.local=$out/.m2 ${mvnParameters}";
# keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside
installPhase = ''
find $out -type f \
-name \*.lastUpdated -or \
-name resolver-status.properties -or \
-name _remote.repositories \
-delete
'';
# don't do any fixup
dontFixup = true;
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-WAB15d4UvUOkBXT7K/hvAZWOE3V1Lpl/tr+AFNBM4FI=";
};
nativeBuildInputs = [
copyDesktopItems
makeWrapper

View File

@ -49,7 +49,7 @@ stdenv.mkDerivation (rec {
runHook preBuild
mvnDeps=$(cp -dpR ${fetchedMavenDeps}/.m2 ./ && chmod +w -R .m2 && pwd)
mvn package --offline "-Dmaven.repo.local=$mvnDeps/.m2" -P desktop,all-platforms
mvn package --offline "-Dmaven.repo.local=$mvnDeps/.m2" ${mvnParameters}
runHook postBuild
'';