Merge pull request #320707 from gepbird/dbeaver-fix-update-script

dbeaver: 24.0.5 -> 24.1.0, fix update script
This commit is contained in:
Weijia Wang 2024-06-20 10:49:20 +02:00 committed by GitHub
commit eea10ae421
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 17 deletions

View File

@ -12,16 +12,7 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbeaver-bin";
version = "24.0.5";
nativeBuildInputs =
[ makeWrapper ]
++ lib.optionals (!stdenvNoCC.isDarwin) [
gnused
wrapGAppsHook3
autoPatchelfHook
]
++ lib.optionals stdenvNoCC.isDarwin [ undmg ];
version = "24.1.0";
src =
let
@ -34,10 +25,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
aarch64-darwin = "macos-aarch64.dmg";
};
hash = selectSystem {
x86_64-linux = "sha256-q6VIr55hXn47kZrE2i6McEOfp2FBOvwB0CcUnRHFMZs=";
aarch64-linux = "sha256-Xn3X1C31UALBAsZIGyMWdp0HNhJEm5N+7Go7nMs8W64=";
x86_64-darwin = "sha256-XOQaMNQHOC4dVJXIUn4l4Oa7Gohbq+JMDFusIy/U+tc=";
aarch64-darwin = "sha256-554ea5p1MR4XIHtSeByd4S/Ke4cKRZbITTNRRDoRqPI=";
x86_64-linux = "sha256-cJcjUoZSpD87jy4GGIxMinZW4gxRZfcGO0GdGUGXI6g=";
aarch64-linux = "sha256-96t/T/VzzzaSWJbPBb1CH2FXqfhiH1d0MjRoPsRMRwo=";
x86_64-darwin = "sha256-8xqSL8fTveg1Y5huBTYZLyubajt27h4XUBzyYVF394A=";
aarch64-darwin = "sha256-r7WqJrNF1IgQHx3Na1fGk0ywsfh5t4Dl/u8hH6CPuoE=";
};
in
fetchurl {
@ -45,15 +36,25 @@ stdenvNoCC.mkDerivation (finalAttrs: {
inherit hash;
};
sourceRoot = lib.optional stdenvNoCC.isDarwin "dbeaver.app";
nativeBuildInputs =
[ makeWrapper ]
++ lib.optionals (!stdenvNoCC.isDarwin) [
gnused
wrapGAppsHook3
autoPatchelfHook
]
++ lib.optionals stdenvNoCC.isDarwin [ undmg ];
dontConfigure = true;
dontBuild = true;
sourceRoot = lib.optional stdenvNoCC.isDarwin "dbeaver.app";
installPhase =
if !stdenvNoCC.isDarwin then
''
runHook preInstall
mkdir -p $out/opt/dbeaver $out/bin
cp -r * $out/opt/dbeaver
makeWrapper $out/opt/dbeaver/dbeaver $out/bin/dbeaver \

View File

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
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 '"')