From 802b3da92cfad5b632044261d525323ae1971f79 Mon Sep 17 00:00:00 2001 From: Antti Harju Date: Mon, 6 Apr 2026 18:32:37 +0300 Subject: [PATCH 1/7] git -> gitMinimal --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 3f13f1c..5d9047e 100644 --- a/flake.nix +++ b/flake.nix @@ -72,7 +72,7 @@ # Everything below is required by GitHub Actions uutils-coreutils-noprefix bash - git + gitMinimal # With plain 'git' perl etc. get bundled in findutils gnutar curl From 87aa59c900e41af41f5f70ebab443eeef1d39619 Mon Sep 17 00:00:00 2001 From: Antti Harju Date: Mon, 6 Apr 2026 19:01:24 +0300 Subject: [PATCH 2/7] Remove yq in favor of toml --- .github/actions/semver-label/action.yml | 2 +- .release/action/values.sh | 2 +- .release/brew/values.sh | 2 +- .release/nix/values.sh | 2 +- .release/render.sh | 2 +- flake.nix | 1 - 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/actions/semver-label/action.yml b/.github/actions/semver-label/action.yml index 61ab9ed..0e52d89 100644 --- a/.github/actions/semver-label/action.yml +++ b/.github/actions/semver-label/action.yml @@ -82,7 +82,7 @@ runs: GH_TOKEN: ${{ github.token }} run: | if [ -f Cargo.toml ]; then - version=$(yq '.package.version' Cargo.toml) + version=$(toml get Cargo.toml package.version --raw) else version=$(gh release view --json name -q '.name' 2>/dev/null || echo '0.0.0') fi diff --git a/.release/action/values.sh b/.release/action/values.sh index 5aeb83f..0580ed6 100755 --- a/.release/action/values.sh +++ b/.release/action/values.sh @@ -9,5 +9,5 @@ capture() { capture PKG_FILENAME action capture PKG_EXTENSION yml repo_root="$(git rev-parse --show-toplevel)" -version="$(yq -p toml -oy '.package.version' "$repo_root/Cargo.toml")" +version="$(toml get "$repo_root/Cargo.toml" package.version --raw)" capture PKG_VERSION "$version" diff --git a/.release/brew/values.sh b/.release/brew/values.sh index bfec219..969ec4a 100755 --- a/.release/brew/values.sh +++ b/.release/brew/values.sh @@ -17,7 +17,7 @@ capture PKG_DESC "$desc" homepage="$(gh api "repos/$GITHUB_REPOSITORY" --jq .homepage)" capture PKG_HOMEPAGE "$homepage" repo_root="$(git rev-parse --show-toplevel)" -version="$(yq -p toml -oy '.package.version' "$repo_root/Cargo.toml")" +version="$(toml get "$repo_root/Cargo.toml" package.version --raw)" capture PKG_VERSION "$version" capture PKG_OWNER "${GITHUB_REPOSITORY%%/*}" diff --git a/.release/nix/values.sh b/.release/nix/values.sh index 5242c42..05d7fc5 100755 --- a/.release/nix/values.sh +++ b/.release/nix/values.sh @@ -11,7 +11,7 @@ capture PKG_FILENAME "default" capture PKG_EXTENSION nix capture PKG_REPO "$repo" repo_root="$(git rev-parse --show-toplevel)" -version="$(yq -p toml -oy '.package.version' "$repo_root/Cargo.toml")" +version="$(toml get "$repo_root/Cargo.toml" package.version --raw)" capture PKG_VERSION "$version" capture PKG_OWNER "${GITHUB_REPOSITORY%%/*}" capture PKG_REV "$GITHUB_SHA" diff --git a/.release/render.sh b/.release/render.sh index f512254..f4fd1a0 100755 --- a/.release/render.sh +++ b/.release/render.sh @@ -36,7 +36,7 @@ mock_github_actions_env() { export GITHUB_REPOSITORY="$owner/$repo" repo_root="$(git rev-parse --show-toplevel)" - tag="v$(yq -p toml -oy '.package.version' "$repo_root/Cargo.toml")" + tag="v$(toml get "$repo_root/Cargo.toml" package.version --raw)" if gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$tag" &>/dev/null; then rev="$(gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$tag" --jq '.object.sha')" else diff --git a/flake.nix b/flake.nix index 5d9047e..2cb4ba3 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,6 @@ rubocop shellcheck gh - yq-go ripgrep # Everything below is required by GitHub Actions uutils-coreutils-noprefix From f1e1511c2866beb16797cb2b86822a7beb0968df Mon Sep 17 00:00:00 2001 From: Antti Harju Date: Mon, 6 Apr 2026 19:01:47 +0300 Subject: [PATCH 3/7] Remove ripgrep --- flake.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/flake.nix b/flake.nix index 2cb4ba3..66acee3 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,6 @@ rubocop shellcheck gh - ripgrep # Everything below is required by GitHub Actions uutils-coreutils-noprefix bash From 9a236a87c02e2980027d26b74c0af193787aae86 Mon Sep 17 00:00:00 2001 From: Antti Harju Date: Mon, 6 Apr 2026 19:25:16 +0300 Subject: [PATCH 4/7] Drop uutils in favor of coreutils Coreutils is here anyway, so no need to have the extra cruft --- .github/actions/cache/action.yml | 2 +- .release/brew/values.sh | 6 +++--- flake.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index b86bd42..907aef7 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -11,7 +11,7 @@ runs: # Hardcode version to 0.0.0 to have a stable hash when dependencies have not changed toml set Cargo.toml package.version "0.0.0" > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml cargo update --package ${GITHUB_REPOSITORY#*/} - HASH=$(cat Cargo.toml Cargo.lock flake.nix flake.lock | hashsum --sha256 --no-names) + HASH=$(cat Cargo.toml Cargo.lock flake.nix flake.lock | sha256sum | cut -d ' ' -f1) git checkout -- Cargo.toml Cargo.lock echo "hash=$HASH" echo "hash=$HASH" >> $GITHUB_OUTPUT diff --git a/.release/brew/values.sh b/.release/brew/values.sh index 969ec4a..5f1e1a8 100755 --- a/.release/brew/values.sh +++ b/.release/brew/values.sh @@ -36,9 +36,9 @@ gh release download "$tag" --pattern "$pattern" --clobber for archive in $pattern; do echo "# $archive" done -mac_arm_sha="$([[ -f "$repo-aarch64-apple-darwin.tar.gz" ]] && hashsum --sha256 "$repo-aarch64-apple-darwin.tar.gz" --no-names || echo "TBD")" +mac_arm_sha="$([[ -f "$repo-aarch64-apple-darwin.tar.gz" ]] && sha256sum "$repo-aarch64-apple-darwin.tar.gz" | cut -d ' ' -f1 || echo "TBD")" capture PKG_MAC_ARM_SHA "$mac_arm_sha" -linux_arm_sha="$([[ -f "$repo-aarch64-unknown-linux-musl.tar.gz" ]] && hashsum --sha256 "$repo-aarch64-unknown-linux-musl.tar.gz" --no-names || echo "TBD")" +linux_arm_sha="$([[ -f "$repo-aarch64-unknown-linux-musl.tar.gz" ]] && sha256sum "$repo-aarch64-unknown-linux-musl.tar.gz" | cut -d ' ' -f1 || echo "TBD")" capture PKG_LINUX_ARM_SHA "$linux_arm_sha" -linux_intel_sha="$([[ -f "$repo-x86_64-unknown-linux-musl.tar.gz" ]] && hashsum --sha256 "$repo-x86_64-unknown-linux-musl.tar.gz" --no-names || echo "TBD")" +linux_intel_sha="$([[ -f "$repo-x86_64-unknown-linux-musl.tar.gz" ]] && sha256sum "$repo-x86_64-unknown-linux-musl.tar.gz" | cut -d ' ' -f1 || echo "TBD")" capture PKG_LINUX_INTEL_SHA "$linux_intel_sha" diff --git a/flake.nix b/flake.nix index 66acee3..a8d56ea 100644 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,7 @@ shellcheck gh # Everything below is required by GitHub Actions - uutils-coreutils-noprefix + coreutils bash gitMinimal # With plain 'git' perl etc. get bundled in findutils From 68cfa1f450535b3a2f98b51b2d7540ea623d3924 Mon Sep 17 00:00:00 2001 From: Antti Harju Date: Mon, 6 Apr 2026 19:38:06 +0300 Subject: [PATCH 5/7] Switch to plain gawk --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index a8d56ea..45719ac 100644 --- a/flake.nix +++ b/flake.nix @@ -77,7 +77,7 @@ jq gzip envsubst - gawkInteractive + gawk xz gnugrep ]; From 9f60142dc10a8362932a00da691d99761fc80ffd Mon Sep 17 00:00:00 2001 From: Antti Harju Date: Mon, 6 Apr 2026 19:41:36 +0300 Subject: [PATCH 6/7] Consistency --- .release/brew/values.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.release/brew/values.sh b/.release/brew/values.sh index 5f1e1a8..05c60b4 100755 --- a/.release/brew/values.sh +++ b/.release/brew/values.sh @@ -10,7 +10,7 @@ repo="${GITHUB_REPOSITORY##*/}" capture PKG_FILENAME "$repo" capture PKG_EXTENSION rb capture PKG_REPO "$repo" -class="$(echo "$repo" | awk -F'-' '{for(i=1;i<=NF;i++) printf "%s%s", toupper(substr($i,1,1)), substr($i,2)}')" +class="$(echo "$repo" | gawk -F'-' '{for(i=1;i<=NF;i++) printf "%s%s", toupper(substr($i,1,1)), substr($i,2)}')" capture PKG_CLASS "$class" desc="$(gh repo view --json description --jq .description)" capture PKG_DESC "$desc" From 1b4673a2928a89015408be304c034814698907ee Mon Sep 17 00:00:00 2001 From: Antti Harju Date: Mon, 6 Apr 2026 19:48:23 +0300 Subject: [PATCH 7/7] Leave a TODO zig 0.16 not being available through an upstream nix distribution is giving me pain --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 45719ac..19f9387 100644 --- a/flake.nix +++ b/flake.nix @@ -60,7 +60,7 @@ editorconfig-checker (python313.withPackages ( ps: with ps; [ - mkdocs-material + mkdocs-material # TODO: switch to zensical. Note that find-changes action is python-based, so that needs to be rewritten. ] )) prettier