From fcaabd2f123d2b31871c04b27deb4327e56e886b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 26 Feb 2026 15:34:27 +0200 Subject: gnu: typst: Rewrite install-artifacts phase. * gnu/packages/rust-apps.scm (typst)[arguments]: Rewrite 'install-artifacts to use the copy-build-system 'install phase. Change-Id: I4a1314ef827ab6a3ab079c5aa7247bda14ce49e6 --- gnu/packages/rust-apps.scm | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 619998bf8ee..7d1d196e5d3 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -3081,10 +3081,11 @@ blanks grouped by language.") (arguments (list #:install-source? #f + #:imported-modules (append %copy-build-system-modules + %cargo-build-system-modules) #:modules '((guix build cargo-build-system) - (guix build utils) - (ice-9 match) - (srfi srfi-26)) + ((guix build copy-build-system) #:prefix copy:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'set-version-string @@ -3095,20 +3096,20 @@ blanks grouped by language.") (mkdir "artifacts") (setenv "GEN_ARTIFACTS" "artifacts"))) (add-after 'install 'install-artifacts - (lambda _ - (with-directory-excursion "artifacts" - (for-each (cut install-file <> - (string-append #$output "/share/man/man1")) - (find-files "." "\\.1$")) - (rename-file "typst.bash" "typst") - (map - (match-lambda - ((file . loc) - (install-file file (string-append #$output "/share" loc)))) - '(("typst" . "/bash-completion/completions") - ("_typst" . "/zsh/site-functions") - ("typst.elv" . "/elvish/lib") - ("typst.fish" . "/fish/vendor_completions.d"))))))))) + (lambda args + (apply (assoc-ref copy:%standard-phases 'install) + #:install-plan + '(("artifacts/typst.bash" + "share/bash-completion/completions/typst") + ("artifacts/typst.elv" + "share//elvish/lib/typst") + ("artifacts/typst.fish" + "share/fish/vendor_completions.d/") + ("artifacts/_typst" + "share/zsh/site-functions/") + ("artifacts/" "share/man/man1/" + #:include-regexp ("\\.1$"))) + args)))))) (inputs (cons* openssl (cargo-inputs 'typst))) (native-search-paths (list (search-path-specification -- cgit v1.3