diff options
| author | Karun Sandhu <129101708+MrSom3body@users.noreply.github.com> | 2025-07-20 13:31:17 +0200 |
|---|---|---|
| committer | Mihai Fufezan <mihai@fufexan.net> | 2025-07-22 09:56:43 +0300 |
| commit | 873914a2a6c0ef1140c9800da005c628db37debe (patch) | |
| tree | 7cacc13fec5b7372cd52756e722723bc52451bc5 /nix | |
| parent | 50758505d5c784052437a371a707fc2dc60bb34a (diff) | |
CI/Nix: also check for qt version in update script
Diffstat (limited to 'nix')
| -rwxr-xr-x | nix/update-inputs.sh | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/nix/update-inputs.sh b/nix/update-inputs.sh index eb4b7dd7..c34e40f6 100755 --- a/nix/update-inputs.sh +++ b/nix/update-inputs.sh @@ -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 |
