aboutsummaryrefslogtreecommitdiffhomepage
path: root/nix
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2023-07-19 19:18:13 +0300
committerMihai Fufezan <[email protected]>2023-07-20 11:20:22 +0300
commita58b70ca0768cdb483835c53a293b3b1a8b3e812 (patch)
treebace732a5fad2c482021bc913f6755353ea64146 /nix
parent91e3c654d309c7723bef374cd4d1a0198a16ba53 (diff)
downloadHyprland-a58b70ca0768cdb483835c53a293b3b1a8b3e812.tar.gz
Hyprland-a58b70ca0768cdb483835c53a293b3b1a8b3e812.zip
CI: update scripts
Diffstat (limited to 'nix')
-rwxr-xr-xnix/update-inputs.sh6
-rwxr-xr-xnix/update-wlroots.sh12
2 files changed, 6 insertions, 12 deletions
diff --git a/nix/update-inputs.sh b/nix/update-inputs.sh
index 96be06b5..eb4b7dd7 100755
--- a/nix/update-inputs.sh
+++ b/nix/update-inputs.sh
@@ -12,14 +12,8 @@ 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"
- # keep wlroots rev, as we don't want to update it
- WLR_REV=$(nix flake metadata --json | jq -r '.locks.nodes.wlroots.locked.rev')
-
# update inputs to latest versions
nix flake update
-
- # hold back wlroots (nix/update-wlroots.nix handles updating that)
- nix flake lock --override-input wlroots "gitlab:wlroots/wlroots/$WLR_REV?host=gitlab.freedesktop.org"
else
echo "nixpkgs is up to date!"
fi
diff --git a/nix/update-wlroots.sh b/nix/update-wlroots.sh
index 858b17e6..addf2df2 100755
--- a/nix/update-wlroots.sh
+++ b/nix/update-wlroots.sh
@@ -1,17 +1,17 @@
-#!/usr/bin/env -S nix shell nixpkgs#gawk nixpkgs#git nixpkgs#gnused nixpkgs#jq nixpkgs#ripgrep -c bash
+#!/usr/bin/env -S nix shell nixpkgs#gawk nixpkgs#git nixpkgs#gnused nixpkgs#ripgrep -c bash
# get wlroots revision from submodule
-SUB_REV=$(git submodule status | rg wlroots | awk '{ print substr($1,2)}')
+SUB_REV=$(git submodule status | rg wlroots | awk '{ print substr($1,2) }')
# and from lockfile
-CRT_REV=$(jq <flake.lock '.nodes.wlroots.locked.rev' -r)
+CRT_REV=$(rg rev flake.nix | awk '{ print substr($3, 2, 40) }')
if [ "$SUB_REV" != "$CRT_REV" ]; then
echo "Updating wlroots..."
# update wlroots to submodule revision
- nix flake lock --override-input wlroots "gitlab:wlroots/wlroots/$SUB_REV?host=gitlab.freedesktop.org"
+ sed -Ei "s/\w{40}/$SUB_REV/g" flake.nix subprojects/wlroots.wrap
+ nix flake lock
- # fix revision in wlroots.wrap
- sed -Ei "s/[a-z0-9]{40}/$SUB_REV/g" subprojects/wlroots.wrap
+ echo "wlroots: $CRT_REV -> $SUB_REV"
else
echo "wlroots is up to date!"
fi