dbeaver-bin: 25.0.2 -> 25.0.4, improve update script (#404824)

authored by Maciej Krüger and committed by GitHub c328e3ee d13f2e68

+9 -8
+6 -6
pkgs/by-name/db/dbeaver-bin/package.nix
··· 17 18 stdenvNoCC.mkDerivation (finalAttrs: { 19 pname = "dbeaver-bin"; 20 - version = "25.0.2"; 21 22 src = 23 let ··· 30 aarch64-darwin = "macos-aarch64.dmg"; 31 }; 32 hash = selectSystem { 33 - x86_64-linux = "sha256-UmTy4Flxz/zIh3cLxRi7EhNDf0Ojc7fuzCbRKIE/+CQ="; 34 - aarch64-linux = "sha256-I+V/2kfdxGx8zNkH98b2685IQPbVPSe9++qS4QEg0LU="; 35 - x86_64-darwin = "sha256-8Qf69OHXPiqdMs//f1jbKbyKoll+oX+P+l3mpdOvraI="; 36 - aarch64-darwin = "sha256-bGxn8y9hvJyqj1/i5tScufO5/ZjdlOlPChmeL+DWwoY="; 37 }; 38 in 39 fetchurl { ··· 63 preInstall = '' 64 # most directories are for different architectures, only keep what we need 65 shopt -s extglob 66 - pushd ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}plugins/com.sun.jna_5.15.0.v20240915-2000/com/sun/jna/ 67 rm -r !(ptr|internal|linux-x86-64|linux-aarch64|darwin-x86-64|darwin-aarch64)/ 68 popd 69 '';
··· 17 18 stdenvNoCC.mkDerivation (finalAttrs: { 19 pname = "dbeaver-bin"; 20 + version = "25.0.4"; 21 22 src = 23 let ··· 30 aarch64-darwin = "macos-aarch64.dmg"; 31 }; 32 hash = selectSystem { 33 + x86_64-linux = "sha256-ALtJIld7gT4pj+jGRkwMloq6B/ZBOMYZxws9N7xNNZg="; 34 + aarch64-linux = "sha256-Ka+jEI6y1BRqV83yDvu1yDzJfpUIxKKD+zehVHcNQ/o="; 35 + x86_64-darwin = "sha256-P8f0NlMjh/46RChQy8JIm71msqX023K2QaFEic2Br9M="; 36 + aarch64-darwin = "sha256-a9H9M1j6iPcrVcfDxCZHeZj6e55QH3XochXaL2OStlI="; 37 }; 38 in 39 fetchurl { ··· 63 preInstall = '' 64 # most directories are for different architectures, only keep what we need 65 shopt -s extglob 66 + pushd ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}plugins/com.sun.jna_*/com/sun/jna/ 67 rm -r !(ptr|internal|linux-x86-64|linux-aarch64|darwin-x86-64|darwin-aarch64)/ 68 popd 69 '';
+3 -2
pkgs/by-name/db/dbeaver-bin/update.sh
··· 1 #!/usr/bin/env nix-shell 2 #!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts 3 4 latestVersion=$(curl "https://api.github.com/repos/dbeaver/dbeaver/tags" | jq -r '.[0].name') 5 - currentVersion=$(nix-instantiate --eval -E "with import ./. {}; dbeaver-bin.version" | tr -d '"') 6 7 echo "latest version: $latestVersion" 8 echo "current version: $currentVersion" ··· 22 prefetch=$(nix-prefetch-url "https://github.com/dbeaver/dbeaver/releases/download/$latestVersion/dbeaver-ce-$latestVersion-$2") 23 hash=$(nix-hash --type sha256 --to-sri $prefetch) 24 25 - update-source-version dbeaver-bin $latestVersion $hash --system=$1 --ignore-same-version 26 done
··· 1 #!/usr/bin/env nix-shell 2 #!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts 3 + BASEDIR="$(dirname "$0")/../../../.." 4 5 latestVersion=$(curl "https://api.github.com/repos/dbeaver/dbeaver/tags" | jq -r '.[0].name') 6 + currentVersion=$(nix-instantiate --eval -E "with import ${BASEDIR} {}; lib.getVersion dbeaver-bin" | tr -d '"') 7 8 echo "latest version: $latestVersion" 9 echo "current version: $currentVersion" ··· 23 prefetch=$(nix-prefetch-url "https://github.com/dbeaver/dbeaver/releases/download/$latestVersion/dbeaver-ce-$latestVersion-$2") 24 hash=$(nix-hash --type sha256 --to-sri $prefetch) 25 26 + (cd "$BASEDIR" && update-source-version dbeaver-bin $latestVersion $hash --system=$1 --ignore-same-version) 27 done