From bc3f1fd85c42d5f6eef460c78bdfdd4115d22cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B7=F0=90=91=91=F0=90=91=B4=F0=90=91=95=F0=90=91=91?= =?UTF-8?q?=F0=90=91=A9=F0=90=91=A4?= Date: Tue, 25 Nov 2025 23:41:49 +0700 Subject: [PATCH] nix-prefetch-pijul: show date --- pkgs/build-support/fetchpijul/nix-prefetch-pijul | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchpijul/nix-prefetch-pijul b/pkgs/build-support/fetchpijul/nix-prefetch-pijul index 9428c38cc14f..bd8d7f169ddb 100755 --- a/pkgs/build-support/fetchpijul/nix-prefetch-pijul +++ b/pkgs/build-support/fetchpijul/nix-prefetch-pijul @@ -6,6 +6,7 @@ remote= channel="main" change= state= +date= exp_hash= usage() { @@ -100,11 +101,15 @@ if [ -z "$final_path" ]; then cd "$tmp_clone" pijul clone $clone_args "$remote" "$name" + latest_log="$(pijul log --repository "$tmp_clone/$name" --limit 1)" # State is a stable reference is a stable reference for the patchset that # doesn't depend on patch order. As a result, it will always be included. if [ -z "$state" ]; then - state="$(pijul log --repository "$tmp_clone/$name" --state --limit 1 | awk '/^State:/ {printf $2}')" + state="$(printf "%s" "$latest_log" | awk '/^State:/ {printf $2}')" fi + date="$(printf "%s" "$latest_log" | awk '/^Date:/ { sub(/^Date:[[:space:]]*/, "", $0); printf $0 }')" + date="$(date -u -d "$date" "+%Y-%m-%dT%H:%M:%SZ")" + rm -rf "$tmp_clone/$name/.pijul" hash="$(nix-hash --type "$hash_algo" "$hash_format" "$tmp_clone/$name")" @@ -132,6 +137,7 @@ if [ -n "$change" ]; then cat <