import/texlive: Ignore architecture-dependent packages.

* guix/import/texlive.scm (tlpdb->package): Filter "depend" field to exclude
package names ending on ".ARCH".
This commit is contained in:
Ricardo Wurmus 2023-03-29 21:02:45 +02:00
parent cbf731ae48
commit 36f78676e5
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -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.
@ -260,6 +260,12 @@ (define (tlpdb->package name version package-database)
%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,14 +284,15 @@ (define (tlpdb->package name version package-database)
;; 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))))))
'())
,@(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 'catalogue-ctan)
(lambda (url)
`((home-page ,(string-append "https://ctan.org" url)))))
@ -295,7 +302,7 @@ (define (tlpdb->package name version package-database)
(assoc-ref data 'longdesc)))
(license ,(string->license
(assoc-ref data 'catalogue-license))))
(or (assoc-ref data 'depend) (list)))))
filtered-depends)))
(define texlive->guix-package
(memoize