summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/minetest-build-system.scm9
-rw-r--r--guix/build/qt-utils.scm10
-rw-r--r--guix/build/utils.scm11
3 files changed, 17 insertions, 13 deletions
diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index 5f68686067..4a7a87ab83 100644
--- a/guix/build/minetest-build-system.scm
+++ b/guix/build/minetest-build-system.scm
@@ -91,15 +91,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/qt-utils.scm b/guix/build/qt-utils.scm
index fa018a93ac..b9c5a76f34 100644
--- a/guix/build/qt-utils.scm
+++ b/guix/build/qt-utils.scm
@@ -91,7 +91,7 @@
'("QTWEBENGINEPROCESS_PATH" = regular
"/lib/qt5/libexec/QtWebEngineProcess"))))
-(define* (wrap-qt-program* program #:key inputs output-dir
+(define* (wrap-qt-program* program #:key sh inputs output-dir
qt-wrap-excluded-inputs)
(define input-directories
@@ -106,9 +106,9 @@
(cons output-dir input-directories)
output-dir)))
(when (not (null? vars-to-wrap))
- (apply wrap-program program vars-to-wrap))))
+ (apply wrap-program program #:sh sh vars-to-wrap))))
-(define* (wrap-qt-program program-name #:key inputs output
+(define* (wrap-qt-program program-name #:key (sh (which "bash")) inputs output
(qt-wrap-excluded-inputs %qt-wrap-excluded-inputs))
"Wrap the specified program (which must reside in the OUTPUT's \"/bin\"
directory) with suitably set environment variables.
@@ -116,10 +116,11 @@ directory) with suitably set environment variables.
This is like qt-build-systems's phase \"qt-wrap\", but only the named program
is wrapped."
(wrap-qt-program* (string-append output "/bin/" program-name)
+ #:sh sh
#:output-dir output #:inputs inputs
#:qt-wrap-excluded-inputs qt-wrap-excluded-inputs))
-(define* (wrap-all-qt-programs #:key inputs outputs
+(define* (wrap-all-qt-programs #:key (sh (which "bash")) inputs outputs
(qt-wrap-excluded-outputs '())
(qt-wrap-excluded-inputs %qt-wrap-excluded-inputs)
#:allow-other-keys)
@@ -148,6 +149,7 @@ add a dependency of that output on Qt."
((output . output-dir)
(unless (member output qt-wrap-excluded-outputs)
(for-each (cut wrap-qt-program* <>
+ #:sh sh
#:output-dir output-dir #:inputs inputs
#:qt-wrap-excluded-inputs qt-wrap-excluded-inputs)
(find-files-to-wrap output-dir))))))
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index dd5a91f52f..b822caf619 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -62,6 +62,8 @@
symbolic-link?
call-with-temporary-output-file
call-with-ascii-input-file
+ file-header-match
+ png-file?
elf-file?
ar-file?
gzip-file?
@@ -291,6 +293,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"))))