Merge pull request #314262 from gepbird/dbeaver-fix-aarch64-and-update-script

dbeaver-bin: fix aarch64 build, add update script
This commit is contained in:
Maciej Krüger 2024-05-24 16:20:44 +02:00 committed by GitHub
commit 7f8fba8e13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 1 deletions

View File

@ -27,7 +27,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
}; };
hash = selectSystem { hash = selectSystem {
x86_64-linux = "sha256-q6VIr55hXn47kZrE2i6McEOfp2FBOvwB0CcUnRHFMZs="; x86_64-linux = "sha256-q6VIr55hXn47kZrE2i6McEOfp2FBOvwB0CcUnRHFMZs=";
aarch64-linux = "sha256-CQg2+p1P+Bg1uFM1PMTWtweS0TNElXTP7tI7D5WxixM="; aarch64-linux = "sha256-Xn3X1C31UALBAsZIGyMWdp0HNhJEm5N+7Go7nMs8W64=";
}; };
in in
fetchurl { fetchurl {
@ -61,6 +61,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postInstall runHook postInstall
''; '';
passthru.updateScript = ./update.sh;
meta = with lib; { meta = with lib; {
homepage = "https://dbeaver.io/"; homepage = "https://dbeaver.io/";
description = "Universal SQL Client for developers, DBA and analysts. Supports MySQL, PostgreSQL, MariaDB, SQLite, and more"; description = "Universal SQL Client for developers, DBA and analysts. Supports MySQL, PostgreSQL, MariaDB, SQLite, and more";

View File

@ -0,0 +1,25 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq
latestVersion=$(curl "https://api.github.com/repos/dbeaver/dbeaver/tags" | jq -r '.[0].name')
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; dbeaver-bin.version" | tr -d '"')
echo "latest version: $latestVersion"
echo "current version: $currentVersion"
if [[ "$latestVersion" == "$currentVersion" ]]; then
echo "package is up-to-date"
exit 0
fi
for i in \
"x86_64-linux linux.gtk.x86_64-nojdk.tar.gz" \
"aarch64-linux linux.gtk.aarch64-nojdk.tar.gz"
do
set -- $i
prefetch=$(nix-prefetch-url "https://github.com/dbeaver/dbeaver/releases/download/$latestVersion/dbeaver-ce-$latestVersion-$2")
hash=$(nix-hash --type sha256 --to-sri $prefetch)
update-source-version dbeaver-bin 0 "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" --system=$1
update-source-version dbeaver-bin $latestVersion $hash --system=$1
done