Skip to content

Commit 873914a

Browse files
MrSom3bodyfufexan
authored andcommitted
CI/Nix: also check for qt version in update script
1 parent 5075850 commit 873914a

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

nix/update-inputs.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
#!/usr/bin/env -S nix shell nixpkgs#jq -c bash
22

3-
# Update inputs when the Mesa version is outdated. We don't want
3+
# Update inputs when the Mesa or QT version is outdated. We don't want
44
# incompatibilities between the user's system and Hyprland.
55

66
# get the current Nixpkgs revision
77
REV=$(jq <flake.lock '.nodes.nixpkgs.locked.rev' -r)
8-
# check versions for current and remote nixpkgs' mesa
9-
CRT_VER=$(nix eval --raw github:nixos/nixpkgs/"$REV"#mesa.version)
10-
NEW_VER=$(nix eval --raw github:nixos/nixpkgs/nixos-unstable#mesa.version)
118

12-
if [ "$CRT_VER" != "$NEW_VER" ]; then
13-
echo "Updating Mesa $CRT_VER -> $NEW_VER and flake inputs"
9+
get_ver() {
10+
nix eval --raw "github:nixos/nixpkgs/$1#$2"
11+
}
12+
13+
# check versions for current and remote nixpkgs'
14+
MESA_OLD=$(get_ver "$REV" mesa.version)
15+
MESA_NEW=$(get_ver nixos-unstable mesa.version)
16+
QT_OLD=$(get_ver "$REV" kdePackages.qtbase.version)
17+
QT_NEW=$(get_ver nixos-unstable kdePackages.qtbase.version)
18+
19+
if [ "$MESA_OLD" != "$MESA_NEW" ] || [ "$QT_OLD" != "$QT_NEW" ]; then
20+
echo "Updating flake inputs..."
21+
echo "Mesa: $MESA_OLD -> $MESA_NEW"
22+
echo "Qt: $QT_OLD -> $QT_NEW"
1423

1524
# update inputs to latest versions
1625
nix flake update

0 commit comments

Comments
 (0)