CI/Nix: also check for qt version in update script

This commit is contained in:
Karun Sandhu
2025-07-20 13:31:17 +02:00
committed by Mihai Fufezan
parent 50758505d5
commit 873914a2a6

View File

@@ -1,16 +1,25 @@
#!/usr/bin/env -S nix shell nixpkgs#jq -c bash
# Update inputs when the Mesa version is outdated. We don't want
# Update inputs when the Mesa or QT version is outdated. We don't want
# incompatibilities between the user's system and Hyprland.
# get the current Nixpkgs revision
REV=$(jq <flake.lock '.nodes.nixpkgs.locked.rev' -r)
# check versions for current and remote nixpkgs' mesa
CRT_VER=$(nix eval --raw github:nixos/nixpkgs/"$REV"#mesa.version)
NEW_VER=$(nix eval --raw github:nixos/nixpkgs/nixos-unstable#mesa.version)
if [ "$CRT_VER" != "$NEW_VER" ]; then
echo "Updating Mesa $CRT_VER -> $NEW_VER and flake inputs"
get_ver() {
nix eval --raw "github:nixos/nixpkgs/$1#$2"
}
# check versions for current and remote nixpkgs'
MESA_OLD=$(get_ver "$REV" mesa.version)
MESA_NEW=$(get_ver nixos-unstable mesa.version)
QT_OLD=$(get_ver "$REV" kdePackages.qtbase.version)
QT_NEW=$(get_ver nixos-unstable kdePackages.qtbase.version)
if [ "$MESA_OLD" != "$MESA_NEW" ] || [ "$QT_OLD" != "$QT_NEW" ]; then
echo "Updating flake inputs..."
echo "Mesa: $MESA_OLD -> $MESA_NEW"
echo "Qt: $QT_OLD -> $QT_NEW"
# update inputs to latest versions
nix flake update