diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-31 10:48:54 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-31 10:48:54 -0400 |
commit | 99b25b131355497e263c7687453f36688ec838a1 (patch) | |
tree | 23dd954ce0d3515bc0cee10db0436b7eeb2f3137 /guix | |
parent | 3d9a57e128369c225df1cbbc57aab22fd5895120 (diff) | |
parent | 47ea688fd27d0ce0c8ea5481f1f94d0ebc3e37eb (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/texlive.scm | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index 82014ee568..086cd363a9 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017, 2021, 2022 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2017, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -246,11 +246,15 @@ of those files are returned that are unexpectedly installed." (define (tlpdb->package name version package-database) (and-let* ((data (assoc-ref package-database name)) (dirs (files->directories - (map (lambda (dir) - (string-drop dir (string-length "texmf-dist/"))) - (append (or (assoc-ref data 'docfiles) (list)) - (or (assoc-ref data 'runfiles) (list)) - (or (assoc-ref data 'srcfiles) (list)))))) + (filter-map (lambda (dir) + ;; Ignore any file not starting with the + ;; expected prefix. Nothing good can come + ;; from this. + (and (string-prefix? "texmf-dist/" dir) + (string-drop dir (string-length "texmf-dist/")))) + (append (or (assoc-ref data 'docfiles) (list)) + (or (assoc-ref data 'runfiles) (list)) + (or (assoc-ref data 'srcfiles) (list)))))) (name (guix-name name)) ;; TODO: we're ignoring the VERSION argument because that ;; information is distributed across %texlive-tag and @@ -260,6 +264,12 @@ of those files are returned that are unexpectedly installed." %texlive-tag "/Master/texmf-dist")) (locations dirs) (revision %texlive-revision))) + ;; Ignore arch-dependent packages. + (filtered-depends + (or (and=> (assoc-ref data 'depend) + (lambda (inputs) + (remove (cut string-suffix? ".ARCH" <>) inputs))) + '())) (source (with-store store (download-multi-svn-to-store store ref (string-append name "-svn-multi-checkout"))))) @@ -278,24 +288,25 @@ of those files are returned that are unexpectedly installed." ;; package->definition in (guix import utils) expects to see a ;; version field. (version ,version) - ,@(or (and=> (assoc-ref data 'depend) - (lambda (inputs) - `((propagated-inputs - (list ,@(map (lambda (tex-name) - (let ((name (guix-name tex-name))) - (string->symbol name))) - inputs)))))) - '()) - ,@(or (and=> (assoc-ref data 'catalogue-ctan) - (lambda (url) - `((home-page ,(string-append "https://ctan.org" url))))) + ,@(match filtered-depends + (() '()) + (inputs + `((propagated-inputs + (list ,@(map + (lambda (tex-name) + (let ((name (guix-name tex-name))) + (string->symbol name))) + inputs)))))) + ,@(or (and=> (assoc-ref data 'name) + (lambda (name) + `((home-page ,(string-append "https://ctan.org/pkg/" + name))))) '((home-page "https://www.tug.org/texlive/"))) (synopsis ,(assoc-ref data 'shortdesc)) - (description ,(beautify-description - (assoc-ref data 'longdesc))) - (license ,(string->license - (assoc-ref data 'catalogue-license)))) - (or (assoc-ref data 'depend) (list))))) + (description ,(and=> (assoc-ref data 'longdesc) beautify-description)) + (license ,(and=> (assoc-ref data 'catalogue-license) + string->license))) + filtered-depends))) (define texlive->guix-package (memoize |