Merge pull request #166063 from jojosch/dbeaver-fix
This commit is contained in:
commit
78e7a97c5e
2 changed files with 6 additions and 31 deletions
|
@ -19,9 +19,11 @@
|
||||||
, javaPackages
|
, javaPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
javaPackages.mavenfod rec {
|
(javaPackages.mavenfod.override {
|
||||||
|
inherit maven; # use overridden maven version (see dbeaver's entry in all-packages.nix)
|
||||||
|
}) rec {
|
||||||
pname = "dbeaver";
|
pname = "dbeaver";
|
||||||
version = "22.0.1"; # When updating also update fetchedMavenDeps.sha256
|
version = "22.0.1"; # When updating also update mvnSha256
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "dbeaver";
|
owner = "dbeaver";
|
||||||
|
@ -30,36 +32,9 @@ javaPackages.mavenfod rec {
|
||||||
sha256 = "sha256-IG5YWwq3WVzQBvAslQ9Z2Ou6ADzf4n9NkQCtH4Jgkac=";
|
sha256 = "sha256-IG5YWwq3WVzQBvAslQ9Z2Ou6ADzf4n9NkQCtH4Jgkac=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mvnSha256 = "WAB15d4UvUOkBXT7K/hvAZWOE3V1Lpl/tr+AFNBM4FI=";
|
||||||
mvnSha256 = "7Sm1hAoi5xc4MLONOD8ySLLkpao0qmlMRRva/8zR210=";
|
|
||||||
mvnParameters = "-P desktop,all-platforms";
|
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 = [
|
nativeBuildInputs = [
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
makeWrapper
|
makeWrapper
|
||||||
|
|
|
@ -49,7 +49,7 @@ stdenv.mkDerivation (rec {
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
mvnDeps=$(cp -dpR ${fetchedMavenDeps}/.m2 ./ && chmod +w -R .m2 && pwd)
|
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
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue