mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
guix: import texlive: Adjust to generate new source format.
* guix/import/texlive.scm (tlpdb->package): Adjust source according to new format. * tests/texlive.scm (%fake-tlpdb): Add database revision. ("texlive->guix-package, no docfiles"): ("texlive->guix-package"): ("texlive->guix-package, with catalogue entry, no inputs"): ("texlive->guix-package, multiple licenses"): ("texlive->guix-package, with TeX format"): Update checks. Change-Id: I60d5fe0f5f8db194c679dcb262f64c824cd19909
This commit is contained in:
parent
9faca7c25b
commit
415ed34860
2 changed files with 75 additions and 40 deletions
|
@ -623,16 +623,23 @@ (define (tlpdb->package upstream-name version database)
|
||||||
`(package
|
`(package
|
||||||
(name ,name)
|
(name ,name)
|
||||||
(version ,(if empty-package? '%texlive-version version))
|
(version ,(if empty-package? '%texlive-version version))
|
||||||
(source ,(and (not meta-package?)
|
(source
|
||||||
`(texlive-origin
|
,(and (not meta-package?)
|
||||||
name version
|
`(origin
|
||||||
(list ,@(svn-multi-reference-locations reference))
|
(method svn-multi-fetch)
|
||||||
(base32
|
(uri (svn-multi-reference
|
||||||
,(bytevector->nix-base32-string
|
(url (texlive-packages-repository version))
|
||||||
(let-values (((port get-hash) (open-sha256-port)))
|
(revision ,(svn-multi-reference-revision reference))
|
||||||
(write-file source port)
|
(locations
|
||||||
(force-output port)
|
(list ,@(svn-multi-reference-locations reference)))))
|
||||||
(get-hash)))))))
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
,(bytevector->nix-base32-string
|
||||||
|
(let-values (((port get-hash) (open-sha256-port)))
|
||||||
|
(write-file source port)
|
||||||
|
(force-output port)
|
||||||
|
(get-hash))))))))
|
||||||
,@(if (assoc-ref data 'docfiles)
|
,@(if (assoc-ref data 'docfiles)
|
||||||
'((outputs '("out" "doc")))
|
'((outputs '("out" "doc")))
|
||||||
'())
|
'())
|
||||||
|
|
|
@ -32,7 +32,8 @@ (define-module (test-texlive)
|
||||||
(test-begin "texlive")
|
(test-begin "texlive")
|
||||||
|
|
||||||
(define %fake-tlpdb
|
(define %fake-tlpdb
|
||||||
'(("12many"
|
'((database-revision . 12345)
|
||||||
|
("12many"
|
||||||
. ((name
|
. ((name
|
||||||
. "12many")
|
. "12many")
|
||||||
(catalogue
|
(catalogue
|
||||||
|
@ -375,10 +376,15 @@ (define %fake-tlpdb
|
||||||
(('package
|
(('package
|
||||||
('name "texlive-example")
|
('name "texlive-example")
|
||||||
('version _)
|
('version _)
|
||||||
('source ('texlive-origin
|
('source ('origin
|
||||||
'name 'version
|
('method 'svn-multi-fetch)
|
||||||
('list "tex/latex/example/")
|
('uri ('svn-multi-reference
|
||||||
('base32 (? string? hash))))
|
('url ('texlive-packages-repository 'version))
|
||||||
|
('revision 12345)
|
||||||
|
('locations ('list "tex/latex/example/"))))
|
||||||
|
('file-name ('git-file-name 'name 'version))
|
||||||
|
('sha256
|
||||||
|
('base32 (? string? hash)))))
|
||||||
('build-system 'texlive-build-system)
|
('build-system 'texlive-build-system)
|
||||||
('home-page (? string?))
|
('home-page (? string?))
|
||||||
('synopsis (? string?))
|
('synopsis (? string?))
|
||||||
|
@ -409,15 +415,21 @@ (define %fake-tlpdb
|
||||||
(('package
|
(('package
|
||||||
('name "texlive-texsis")
|
('name "texlive-texsis")
|
||||||
('version _)
|
('version _)
|
||||||
('source ('texlive-origin
|
('source ('origin
|
||||||
'name 'version
|
('method 'svn-multi-fetch)
|
||||||
('list "bibtex/bst/texsis/"
|
('uri ('svn-multi-reference
|
||||||
"doc/man/man1/texsis.1"
|
('url ('texlive-packages-repository 'version))
|
||||||
"doc/man/man1/texsis.man1.pdf"
|
('revision 12345)
|
||||||
"doc/otherformats/texsis/base/"
|
('locations
|
||||||
"tex/texsis/base/"
|
('list "bibtex/bst/texsis/"
|
||||||
"tex/texsis/config/")
|
"doc/man/man1/texsis.1"
|
||||||
('base32 (? string? hash))))
|
"doc/man/man1/texsis.man1.pdf"
|
||||||
|
"doc/otherformats/texsis/base/"
|
||||||
|
"tex/texsis/base/"
|
||||||
|
"tex/texsis/config/"))))
|
||||||
|
('file-name ('git-file-name 'name 'version))
|
||||||
|
('sha256
|
||||||
|
('base32 (? string? hash)))))
|
||||||
('outputs ''("out" "doc"))
|
('outputs ''("out" "doc"))
|
||||||
('build-system 'texlive-build-system)
|
('build-system 'texlive-build-system)
|
||||||
('propagated-inputs
|
('propagated-inputs
|
||||||
|
@ -489,12 +501,17 @@ (define %fake-tlpdb
|
||||||
(('package
|
(('package
|
||||||
('name "texlive-12many")
|
('name "texlive-12many")
|
||||||
('version _)
|
('version _)
|
||||||
('source ('texlive-origin
|
('source ('origin
|
||||||
'name 'version
|
('method 'svn-multi-fetch)
|
||||||
('list "doc/latex/12many/"
|
('uri ('svn-multi-reference
|
||||||
"source/latex/12many/"
|
('url ('texlive-packages-repository 'version))
|
||||||
"tex/latex/12many/")
|
('revision 12345)
|
||||||
('base32 (? string? hash))))
|
('locations ('list "doc/latex/12many/"
|
||||||
|
"source/latex/12many/"
|
||||||
|
"tex/latex/12many/"))))
|
||||||
|
('file-name ('git-file-name 'name 'version))
|
||||||
|
('sha256
|
||||||
|
('base32 (? string? hash)))))
|
||||||
('outputs ''("out" "doc"))
|
('outputs ''("out" "doc"))
|
||||||
('build-system 'texlive-build-system)
|
('build-system 'texlive-build-system)
|
||||||
('home-page "https://ctan.org/pkg/one2many")
|
('home-page "https://ctan.org/pkg/one2many")
|
||||||
|
@ -526,11 +543,17 @@ (define %fake-tlpdb
|
||||||
(('package
|
(('package
|
||||||
('name "texlive-chs-physics-report")
|
('name "texlive-chs-physics-report")
|
||||||
('version _)
|
('version _)
|
||||||
('source ('texlive-origin
|
('source ('origin
|
||||||
'name 'version
|
('method 'svn-multi-fetch)
|
||||||
('list "doc/latex/chs-physics-report/"
|
('uri ('svn-multi-reference
|
||||||
"tex/latex/chs-physics-report/")
|
('url ('texlive-packages-repository 'version))
|
||||||
('base32 (? string? hash))))
|
('revision 12345)
|
||||||
|
('locations
|
||||||
|
('list "doc/latex/chs-physics-report/"
|
||||||
|
"tex/latex/chs-physics-report/"))))
|
||||||
|
('file-name ('git-file-name 'name 'version))
|
||||||
|
('sha256
|
||||||
|
('base32 (? string? hash)))))
|
||||||
('outputs ''("out" "doc"))
|
('outputs ''("out" "doc"))
|
||||||
('build-system 'texlive-build-system)
|
('build-system 'texlive-build-system)
|
||||||
('home-page (? string?))
|
('home-page (? string?))
|
||||||
|
@ -598,11 +621,16 @@ (define %fake-tlpdb
|
||||||
(('package
|
(('package
|
||||||
('name "texlive-lollipop")
|
('name "texlive-lollipop")
|
||||||
('version _)
|
('version _)
|
||||||
('source ('texlive-origin
|
('source ('origin
|
||||||
'name 'version
|
('method 'svn-multi-fetch)
|
||||||
('list "doc/otherformats/lollipop/"
|
('uri ('svn-multi-reference
|
||||||
"tex/lollipop/")
|
('url ('texlive-packages-repository 'version))
|
||||||
('base32 (? string? hash))))
|
('revision 12345)
|
||||||
|
('locations ('list "doc/otherformats/lollipop/"
|
||||||
|
"tex/lollipop/"))))
|
||||||
|
('file-name ('git-file-name 'name 'version))
|
||||||
|
('sha256
|
||||||
|
('base32 (? string? hash)))))
|
||||||
('outputs ''("out" "doc"))
|
('outputs ''("out" "doc"))
|
||||||
('build-system 'texlive-build-system)
|
('build-system 'texlive-build-system)
|
||||||
('arguments ('list '#:create-formats ('gexp ('list "lollipop"))))
|
('arguments ('list '#:create-formats ('gexp ('list "lollipop"))))
|
||||||
|
|
Loading…
Reference in a new issue