[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50905] [PATCH core-updates v2 05/38] build/minetest-build-system: M
From: |
Maxime Devos |
Subject: |
[bug#50905] [PATCH core-updates v2 05/38] build/minetest-build-system: Move png-file? to (guix build utils). |
Date: |
Fri, 1 Oct 2021 16:21:07 +0200 |
It's not really Minetest-specific. It was only placed in
(guix build minetest-build-system) to avoid a world rebuild.
* guix/build/minetest-build-system.scm (%png-magic-bytes,png-file?):
Move to ...
* guix/build/utils.scm (%png-magic-bytes,png-file?): ... here.
---
guix/build/minetest-build-system.scm | 9 ---------
guix/build/utils.scm | 11 +++++++++++
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/guix/build/minetest-build-system.scm
b/guix/build/minetest-build-system.scm
index 477cc3d1d0..5d7d8d2292 100644
--- a/guix/build/minetest-build-system.scm
+++ b/guix/build/minetest-build-system.scm
@@ -90,15 +90,6 @@ If it is unknown, make an educated guess."
#:install-plan (mod-install-plan (apply guess-mod-name arguments))
arguments))
-(define %png-magic-bytes
- ;; Magic bytes of PNG images, see ‘5.2 PNG signatures’ in
- ;; ‘Portable Network Graphics (PNG) Specification (Second Edition)’
- ;; on <https://www.w3.org/TR/PNG/>.
- #vu8(137 80 78 71 13 10 26 10))
-
-(define png-file?
- ((@@ (guix build utils) file-header-match) %png-magic-bytes))
-
(define* (minimise-png #:key inputs native-inputs #:allow-other-keys)
"Minimise PNG images found in the working directory."
(define optipng (which "optipng"))
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 3beb7da67a..39e581b0fa 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -61,6 +61,8 @@
symbolic-link?
call-with-temporary-output-file
call-with-ascii-input-file
+ file-header-match
+ png-file?
elf-file?
ar-file?
gzip-file?
@@ -290,6 +292,15 @@ with the bytes in HEADER, a bytevector."
#f ;FILE is a directory
(apply throw args))))))
+(define %png-magic-bytes
+ ;; Magic bytes of PNG images, see ‘5.2 PNG signatures’ in
+ ;; ‘Portable Network Graphics (PNG) Specification (Second Edition)’
+ ;; on <https://www.w3.org/TR/PNG/>.
+ #vu8(137 80 78 71 13 10 26 10))
+
+(define png-file?
+ (file-header-match %png-magic-bytes))
+
(define %elf-magic-bytes
;; Magic bytes of ELF files. See <elf.h>.
(u8-list->bytevector (map char->integer (string->list "\x7FELF"))))
--
2.33.0
- [bug#50905] [PATCH core-updates v2 17/38] gnu: pango: Make 'bash-minimal' input unconditional., (continued)
- [bug#50905] [PATCH core-updates v2 17/38] gnu: pango: Make 'bash-minimal' input unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 34/38] gnu: heimdal: Make 'bash-minimal' input unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 38/38] lint: check-wrapper-inputs: Remove mentions of core-updates., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 36/38] gnu: libproxy: Respect #:tests?., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 33/38] gnu: heimdal: Make some parts of phases unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 03/38] gnu: mozjs: Use mozilla-build-system., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 25/38] gnu: at-spi2-core: Unconditionally lookup docbook in native-inputs., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 35/38] gnu: libcap: Unconditionally use #$output., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 07/38] gnu: mozjs: Make the quasiquote unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 10/38] gnu: isc-dhcp: Remove unnecessary shebang patching., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 05/38] build/minetest-build-system: Move png-file? to (guix build utils).,
Maxime Devos <=
- [bug#50905] [PATCH core-updates v2 14/38] gnu: cairo: Make 'bash-minimal' input unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 28/38] gnu: avahi: Make the 'patch-more-shebangs' phase unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 15/38] gnu: libthai: Make 'datrie' input unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 20/38] gnu: gdk-pixbuf: Use target predicates., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 18/38] gnu: gdk-pixbuf: Unconditionally lookup docbook in native-inputs., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 23/38] gnu: at-spi2-core: Make 'bash-minimal' input unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 27/38] gnu: avahi: Make 'bash-minimal' input unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 21/38] gnu: gdk-pixbuf: Make 'bash-minimal' input unconditional., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 22/38] gnu: gdk-pixbuf: Remove trailing #t., Maxime Devos, 2021/10/01
- [bug#50905] [PATCH core-updates v2 24/38] gnu: at-spi2-core: Respect #:tests?., Maxime Devos, 2021/10/01