guix: use a temporary file over sponge

Remove sponge (moreutils).
This commit is contained in:
fanquake
2025-12-09 11:31:16 +00:00
parent a2fd558760
commit c86bce597a
3 changed files with 8 additions and 35 deletions

View File

@@ -400,12 +400,14 @@ mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
|| ( rm -rf "$ACTUAL_OUTDIR" && exit 1 )
(
tmp="$(mktemp)"
cd /outdir-base
{
echo "$GIT_ARCHIVE"
find "$ACTUAL_OUTDIR" -type f
} | xargs realpath --relative-base="$PWD" \
| xargs sha256sum \
| sort -k2 \
| sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part
| xargs sha256sum \
| sort -k2 \
> "$tmp";
mv "$tmp" "$ACTUAL_OUTDIR"/SHA256SUMS.part
)

View File

@@ -141,6 +141,7 @@ mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
|| ( rm -rf "$ACTUAL_OUTDIR" && exit 1 )
(
tmp="$(mktemp)"
cd /outdir-base
{
echo "$CODESIGNING_TARBALL"
@@ -149,5 +150,6 @@ mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
} | xargs realpath --relative-base="$PWD" \
| xargs sha256sum \
| sort -k2 \
| sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part
> "$tmp";
mv "$tmp" "$ACTUAL_OUTDIR"/SHA256SUMS.part
)

View File

@@ -521,36 +521,6 @@ inspecting signatures in Mach-O binaries.")
(("^install-others =.*$")
(string-append "install-others = " out "/etc/rpc\n")))))))))))))
;; The sponge tool from moreutils.
(define-public sponge
(package
(name "sponge")
(version "0.69")
(source (origin
(method url-fetch)
(uri (string-append
"https://git.joeyh.name/index.cgi/moreutils.git/snapshot/
moreutils-" version ".tar.gz"))
(file-name (string-append "moreutils-" version ".tar.gz"))
(sha256
(base32
"1l859qnzccslvxlh5ghn863bkq2vgmqgnik6jr21b9kc6ljmsy8g"))))
(build-system gnu-build-system)
(arguments
(list #:phases
#~(modify-phases %standard-phases
(delete 'configure)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
(install-file "sponge" bin)))))
#:make-flags
#~(list "sponge" (string-append "CC=" #$(cc-for-target)))))
(home-page "https://joeyh.name/code/moreutils/")
(synopsis "Miscellaneous general-purpose command-line tools")
(description "Just sponge")
(license license:gpl2+)))
(packages->manifest
(append
(list ;; The Basics
@@ -565,7 +535,6 @@ inspecting signatures in Mach-O binaries.")
patch
gawk
sed
sponge
;; Compression and archiving
tar
gzip