[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
18/416: gnu: xdg-utils: Use G-expression.
From: |
guix-commits |
Subject: |
18/416: gnu: xdg-utils: Use G-expression. |
Date: |
Fri, 14 Apr 2023 15:25:12 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 47234c396061d5bb80d9c4fa1e330f1a3875d8d7
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Fri Nov 18 09:58:06 2022 +0100
gnu: xdg-utils: Use G-expression.
* gnu/packages/freedesktop.scm (xdg-utils)[arguments]: Use gexp.
---
gnu/packages/freedesktop.scm | 102 ++++++++++++++++++++++---------------------
1 file changed, 52 insertions(+), 50 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 5684bb1b94..672de9d55b 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -497,57 +497,59 @@ display servers. It supports many different languages
and emoji.")
xprop ;for Xfce detecting
xset)) ;for xdg-screensaver
(arguments
- `(#:tests? #f ;no check target
- #:modules ((srfi srfi-26)
+ (list
+ #:tests? #f ;no check target
+ #:modules `((srfi srfi-26)
,@%gnu-build-system-modules)
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-hardcoded-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "scripts/xdg-mime.in"
- (("/usr/bin/file")
- (search-input-file inputs "bin/file")))
- (substitute* "scripts/xdg-open.in"
- (("/usr/bin/printf")
- (search-input-file inputs "bin/printf")))))
- (add-before 'build 'locate-catalog-files
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- (let* ((native (or native-inputs inputs))
- (xmldoc (search-input-directory native
- "xml/dtd/docbook"))
- (xsldoc (search-input-directory
- native
- (string-append "xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl)))))
- (for-each (lambda (file)
- (substitute* file
- (("http://.*/docbookx\\.dtd")
- (string-append xmldoc "/docbookx.dtd"))))
- (find-files "scripts/desc" "\\.xml$"))
- (substitute* "scripts/Makefile"
- ;; Apparently `xmlto' does not bother to looks up the
stylesheets
- ;; specified in the XML, unlike the above substitition.
Instead it
- ;; uses a hard-coded URL. Work around it here, but if this is
- ;; common perhaps we should hardcode this path in xmlto
itself.
- (("\\$\\(XMLTO\\) man")
- (string-append "$(XMLTO) -x " xsldoc
- "/manpages/docbook.xsl man")))
- (setenv "STYLESHEET"
- (string-append xsldoc "/html/docbook.xsl")))))
- (add-after 'install 'wrap-executables
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (dependencies '("awk" "grep" "hostname" "ls" "mimeopen"
- "sed" "xprop" "xset"))
- (pkgs (map (lambda (cmd)
- (search-input-file inputs
- (string-append "bin/"
cmd)))
- dependencies))
- (bindirs (map dirname pkgs)))
- (with-directory-excursion (string-append out "/bin")
- (for-each (cute wrap-program <>
- `("PATH" ":" prefix ,bindirs))
- (find-files ".")))))))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-hardcoded-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "scripts/xdg-mime.in"
+ (("/usr/bin/file")
+ (search-input-file inputs "bin/file")))
+ (substitute* "scripts/xdg-open.in"
+ (("/usr/bin/printf")
+ (search-input-file inputs "bin/printf")))))
+ (add-before 'build 'locate-catalog-files
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (let* ((native (or native-inputs inputs))
+ (xmldoc (search-input-directory native
+ "xml/dtd/docbook"))
+ (xsldoc (search-input-directory
+ native
+ (string-append "xml/xsl/docbook-xsl-"
+ #$(package-version
+ (this-package-native-input
+ "docbook-xsl"))))))
+ (for-each (lambda (file)
+ (substitute* file
+ (("http://.*/docbookx\\.dtd")
+ (string-append xmldoc "/docbookx.dtd"))))
+ (find-files "scripts/desc" "\\.xml$"))
+ (substitute* "scripts/Makefile"
+ ;; Apparently `xmlto' does not bother to looks up the
stylesheets
+ ;; specified in the XML, unlike the above substitition.
Instead it
+ ;; uses a hard-coded URL. Work around it here, but if this is
+ ;; common perhaps we should hardcode this path in xmlto itself.
+ (("\\$\\(XMLTO\\) man")
+ (string-append "$(XMLTO) -x " xsldoc
+ "/manpages/docbook.xsl man")))
+ (setenv "STYLESHEET"
+ (string-append xsldoc "/html/docbook.xsl")))))
+ (add-after 'install 'wrap-executables
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((dependencies '("awk" "grep" "hostname" "ls" "mimeopen"
+ "sed" "xprop" "xset"))
+ (pkgs (map (lambda (cmd)
+ (search-input-file inputs
+ (string-append "bin/" cmd)))
+ dependencies))
+ (bindirs (map dirname pkgs)))
+ (with-directory-excursion (string-append #$output "/bin")
+ (for-each (cute wrap-program <>
+ `("PATH" ":" prefix ,bindirs))
+ (find-files ".")))))))))
(home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
(synopsis "Freedesktop.org scripts for desktop integration")
(description "The xdg-utils package is a set of simple scripts that
- 21/416: gnu: sbcl: Resolve TODO., (continued)
- 21/416: gnu: sbcl: Resolve TODO., guix-commits, 2023/04/14
- 04/416: gnu: vulkan-loader: Update to 1.2.202., guix-commits, 2023/04/14
- 05/416: gnu: vulkan-tools: Update to 1.2.201., guix-commits, 2023/04/14
- 08/416: gnu: vulkan-validationlayers: Avoid direct variable references., guix-commits, 2023/04/14
- 10/416: gnu: spirv-headers: Update to 1.3.231.1., guix-commits, 2023/04/14
- 09/416: gnu: spirv-tools: Disable building static libraries., guix-commits, 2023/04/14
- 11/416: gnu: spirv-tools: Update to 2022.4., guix-commits, 2023/04/14
- 12/416: gnu: glslang: Update to 11.9.0., guix-commits, 2023/04/14
- 13/416: gnu: libaom: Update to 3.5.0., guix-commits, 2023/04/14
- 17/416: gnu: xdg-utils: Resolve TODOs., guix-commits, 2023/04/14
- 18/416: gnu: xdg-utils: Use G-expression.,
guix-commits <=
- 14/416: gnu: VLC: Fix build with dav1d 1.0., guix-commits, 2023/04/14
- 22/416: gnu: spirv-headers: Replace version with %vulkan-sdk-version., guix-commits, 2023/04/14
- 23/416: gnu: spirv-tools: Replace version with %vulkan-sdk-version., guix-commits, 2023/04/14
- 25/416: gnu: spirv-cross: Update to sdk-1.3.231.1., guix-commits, 2023/04/14
- 29/416: gnu: vulkan-tools: Update to sdk-1.3.231.1., guix-commits, 2023/04/14
- 15/416: gnu: python-pytest-mock: Update to 3.10.0., guix-commits, 2023/04/14
- 24/416: gnu: glslang: Update to sdk-1.3.231.1., guix-commits, 2023/04/14
- 26/416: gnu: shaderc: Update to 2022.3., guix-commits, 2023/04/14
- 31/416: gnu: Add volk., guix-commits, 2023/04/14
- 50/416: gnu: MariaDB: Remove input labels., guix-commits, 2023/04/14