@@ -122,29 +122,15 @@
(arguments
`(#:tests? #f ; no check target
#:modules ((srfi srfi-26)
- (guix build utils)
- (guix build gnu-build-system))
+ ,@%gnu-build-system-modules)
#:phases
(modify-phases %standard-phases
- (add-after 'install 'patch-hardcoded-paths
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (with-directory-excursion (string-append (assoc-ref outputs "out")
- "/bin")
- (substitute* "xdg-mime"
- (("/usr/bin/file") (which "file")))
- (substitute* "xdg-open"
- (("/usr/bin/printf") (which "printf")))
- (let ((path-ext
- (map (cute string-append <> "/bin")
- (cons (assoc-ref outputs "out")
- (map (cute assoc-ref inputs <>)
- '("awk" "coreutils" "grep" "inetutils"
- "perl-file-mimeinfo" "sed" "xprop"
- "xset"))))))
- (for-each
- (cute wrap-program <>
- `("PATH" ":" prefix ,path-ext))
- (find-files "."))))
+ (add-after 'unpack 'patch-hardcoded-paths
+ (lambda _
+ (substitute* "scripts/xdg-mime.in"
+ (("/usr/bin/file") (which "file")))
+ (substitute* "scripts/xdg-open.in"
+ (("/usr/bin/printf") (which "printf")))
#t))
(add-before 'build 'locate-catalog-files
(lambda* (#:key inputs #:allow-other-keys)
@@ -168,6 +154,21 @@
"/manpages/docbook.xsl man")))
(setenv "STYLESHEET"
(string-append xsldoc "/html/docbook.xsl"))
+ #t)))
+ (add-after 'install 'wrap-executables
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (with-directory-excursion (string-append out "/bin")
+ (let ((path-ext
+ (map (cute string-append <> "/bin")
+ (cons out
+ (map (cute assoc-ref inputs <>)
+ '("awk" "coreutils" "grep" "inetutils"
+ "perl-file-mimeinfo" "sed" "xprop"
+ "xset"))))))
+ (for-each (cute wrap-program <>
+ `("PATH" ":" prefix ,path-ext))
+ (find-files "."))))
#t))))))
(home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
(synopsis "Freedesktop.org scripts for desktop integration")