From 91832fa35f790ae44545ba2d90a7e8b60a52efe2 Mon Sep 17 00:00:00 2001 From: Yury Shvedov Date: Fri, 9 Feb 2024 10:56:16 +0300 Subject: [PATCH] [update/flake] Fix flake.lock update periodicity Check if exe binary was update first, then update all flake.lock only when exe was updated. Change-Id: I3ae7e7453cfe4ea78d1c4e598cc4a3370cd12f1d --- generate_packages.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generate_packages.sh b/generate_packages.sh index 08febb1..cf2898a 100644 --- a/generate_packages.sh +++ b/generate_packages.sh @@ -73,7 +73,10 @@ update_pkbuild() { update_flake() { sed -i 's#\(ymExe\.url\s*=\s*\).*;#\1'"$exe_link"';#' ./flake.nix if check_dep nix; then - nix --extra-experimental-features 'nix-command flakes' flake update + nix --extra-experimental-features 'nix-command flakes' flake lock update --update-input ymExe + if [[ $(git status --porcelain) ]]; then + nix --extra-experimental-features 'nix-command flakes' flake update + fi else echo "flake.nix was updated, but nix is not installed to update flake.lock" fi