home-assistant: 2025.1.1 -> 2025.1.2 (#372513)
[NixPkgs.git] / pkgs / development / libraries / libcef / update.sh
blobd11fd7193d6e125c124867d2d4f45f8cd9d5f438
1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl gnused jq
4 set -x -eu -o pipefail
6 cd $(dirname "${BASH_SOURCE[0]}")
8 VERSION_JSON=$(curl --silent https://cef-builds.spotifycdn.com/index.json | jq '[.linux64.versions[] | select (.channel == "stable")][0]')
10 CEF_VERSION=$(echo ${VERSION_JSON} | jq -r '.cef_version' | cut -d'+' -f1)
11 GIT_REVISION=$(echo ${VERSION_JSON} | jq -r '.cef_version' | cut -d'+' -f2 | cut -c 2-)
12 CHROMIUM_VERSION=$(echo ${VERSION_JSON} | jq -r '.chromium_version')
14 SHA256_LINUX64=$(nix-prefetch-url --quiet https://cef-builds.spotifycdn.com/cef_binary_${CEF_VERSION}+g${GIT_REVISION}+chromium-${CHROMIUM_VERSION}_linux64_minimal.tar.bz2)
15 SHA256_LINUXARM64=$(nix-prefetch-url --quiet https://cef-builds.spotifycdn.com/cef_binary_${CEF_VERSION}+g${GIT_REVISION}+chromium-${CHROMIUM_VERSION}_linuxarm64_minimal.tar.bz2)
17 setKV () {
18 sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./default.nix
21 setKV version ${CEF_VERSION}
22 setKV gitRevision ${GIT_REVISION}
23 setKV chromiumVersion ${CHROMIUM_VERSION}
24 setKV 'platforms."aarch64-linux".sha256' ${SHA256_LINUXARM64}
25 setKV 'platforms."x86_64-linux".sha256' ${SHA256_LINUX64}