microsoft-identity-broker: fix the hash (#340811)

This commit is contained in:
Sandro
2024-10-18 04:26:12 +02:00
committed by GitHub
2 changed files with 7 additions and 3 deletions
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/m/microsoft-identity-broker/microsoft-identity-broker_${version}_amd64.deb";
hash = "sha256-O9zbImSWMrRsaOozj5PsCRvQ3UsaJzLfoTohmLZvLkM=";
hash = "sha256-I4Q6ucT6ps8/QGiQTNbMXcKxq6UMcuwJ0Prcqvov56M=";
};
nativeBuildInputs = [ dpkg makeWrapper openjdk11 zip ];
@@ -12,15 +12,19 @@ echo "$index_file" | while read -r line; do
if [[ "$line" =~ ^Version:[[:space:]]*(.*) ]]; then
Version="${BASH_REMATCH[1]}"
fi
if [[ "$line" =~ ^SHA256:[[:space:]]*(.*) ]]; then
SHA256="${BASH_REMATCH[1]}"
fi
if ! [[ "$line" ]] && [[ "${Package}" == "microsoft-identity-broker" ]]; then
if ( dpkg --compare-versions ${Version} gt ${latest_version} ); then
latest_version="${Version}"
sri_hash=$(nix-hash --to-sri --type sha256 "$SHA256")
echo $latest_version
echo $latest_version $sri_hash
fi
Package=""
Version=""
fi
done | tail -n 1 | (read version; update-source-version microsoft-identity-broker $version)
done | tail -n 1 | (read version hash; update-source-version microsoft-identity-broker $version $hash)