From a58b70ca0768cdb483835c53a293b3b1a8b3e812 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Wed, 19 Jul 2023 19:18:13 +0300 Subject: [PATCH] CI: update scripts --- flake.nix | 6 +++++- nix/update-inputs.sh | 6 ------ nix/update-wlroots.sh | 12 ++++++------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 0cc0b0f1..fc595c3d 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,11 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; wlroots = { - url = "gitlab:wlroots/wlroots?host=gitlab.freedesktop.org"; + type = "gitlab"; + host = "gitlab.freedesktop.org"; + owner = "wlroots"; + repo = "wlroots"; + rev = "7791ffe0584c4ac13c170e1661ce33bdbd4a9b9e"; flake = false; }; 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 $SUB_REV" else echo "wlroots is up to date!" fi