[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/452: guix: import: Improve home-page generation in texlive importer.
From: |
guix-commits |
Subject: |
04/452: guix: import: Improve home-page generation in texlive importer. |
Date: |
Fri, 9 Jun 2023 13:42:46 -0400 (EDT) |
ngz pushed a commit to branch tex-team-next
in repository guix.
commit e13ca0f89c92b4eb7ecd8146fdf08ff6179a5545
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Mon May 15 00:45:54 2023 +0200
guix: import: Improve home-page generation in texlive importer.
* guix/import/texlive.scm (tlpdb): Also register `catalogue' key.
(tlpdb->package): First try to use catalogue for the home-page, then the
name.
* tests/texlive.scm (%fake-tlpdb): Add tests data.
("texlive->guix-package, with catalogue entry, no inputs"): New test.
---
guix/import/texlive.scm | 1 +
tests/texlive.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index e5fcb7adf8..8618ccd802 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -133,6 +133,7 @@
'((name . string)
(shortdesc . string)
(longdesc . string)
+ (catalogue . string)
(catalogue-license . string)
(catalogue-ctan . string)
(srcfiles . list)
diff --git a/tests/texlive.scm b/tests/texlive.scm
index 1493fc87bb..19bb3bda1b 100644
--- a/tests/texlive.scm
+++ b/tests/texlive.scm
@@ -32,7 +32,25 @@
(test-begin "texlive")
(define %fake-tlpdb
- '(("example"
+ '(("12many"
+ . ((name
+ . "12many")
+ (catalogue
+ . "one2many")
+ (shortdesc
+ . "Generalising mathematical index sets")
+ (longdesc
+ . "In the discrete branches of mathematics...")
+ (docfiles
+ . ("texmf-dist/doc/latex/12many/12many.pdf"
+ "texmf-dist/doc/latex/12many/README"))
+ (srcfiles
+ . ("texmf-dist/source/latex/12many/12many.dtx"
+ "texmf-dist/source/latex/12many/12many.ins"))
+ (runfiles
+ . ("texmf-dist/tex/latex/12many/12many.sty"))
+ (catalogue-license . "lppl")))
+ ("example"
. ((name . "example")
(shortdesc . "Typeset examples...")
(longdesc . "The package makes it easier...")
@@ -247,4 +265,41 @@ completely compatible with Plain TeX.")
(format #t "~s~%" result)
(pk 'fail result #f)))))))
+(test-assert "texlive->guix-package, with catalogue entry, no inputs"
+ ;; Replace network resources with sample data.
+ (mock ((guix build svn) svn-fetch
+ (lambda* (url revision directory
+ #:key (svn-command "svn")
+ (user-name #f)
+ (password #f)
+ (recursive? #t))
+ (mkdir-p directory)
+ (with-output-to-file (string-append directory "/foo")
+ (lambda ()
+ (display "source")))))
+ (let ((result (texlive->guix-package "12many"
+ #:package-database
+ (lambda _ %fake-tlpdb))))
+ (match result
+ (('package
+ ('name "texlive-12many")
+ ('version _)
+ ('source ('texlive-origin
+ 'name 'version
+ ('list "doc/latex/12many/"
+ "source/latex/12many/"
+ "tex/latex/12many/")
+ ('base32 (? string? hash))))
+ ('outputs ''("out" "doc"))
+ ('build-system 'texlive-build-system)
+ ('home-page "https://ctan.org/pkg/one2many")
+ ('synopsis (? string?))
+ ('description (? string?))
+ ('license 'lppl))
+ #true)
+ (_
+ (begin
+ (format #t "~s~%" result)
+ (pk 'fail result #f)))))))
+
(test-end "texlive")
- branch tex-team-next created (now ad5bd4bd68), guix-commits, 2023/06/09
- 02/452: gnu: Simplify simple-texlive-package for non-trivial packages., guix-commits, 2023/06/09
- 04/452: guix: import: Improve home-page generation in texlive importer.,
guix-commits <=
- 06/452: guix: import: Fix multiple licenses output in texlive importer., guix-commits, 2023/06/09
- 01/452: guix: texlive-build-system: Improvements on non-trivial packages., guix-commits, 2023/06/09
- 05/452: guix: import: texlive use full file names for generic directories., guix-commits, 2023/06/09
- 08/452: gnu: texlive-latex-blindtext -> texlive-blindtext., guix-commits, 2023/06/09
- 09/452: gnu: texlive-latex-dinbrief -> texlive-dinbrief., guix-commits, 2023/06/09
- 12/452: gnu: texlive-latex-trimspaces -> texlive-trimspaces., guix-commits, 2023/06/09
- 10/452: gnu: Add texlive-everypage., guix-commits, 2023/06/09
- 11/452: gnu: texlive-latex-draftwatermark -> texlive-draftwatermark., guix-commits, 2023/06/09
- 07/452: gnu: texlive-latex-l3kernel -> texlive-l3kernel., guix-commits, 2023/06/09
- 03/452: guix: import: Update texlive importer according to new build system., guix-commits, 2023/06/09