diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-05-05 17:22:03 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-07-18 18:10:25 +0200 |
commit | 4a245129ffc84ca9a173da82df6f91239c6b1fe6 (patch) | |
tree | 007110fbeca7aa6a85bc1fefd1eadb5e28107e06 /guix/import | |
parent | bc3384923e704ffa7c1f091d4700a701c39f0d33 (diff) | |
download | guix-patches-4a245129ffc84ca9a173da82df6f91239c6b1fe6.tar guix-patches-4a245129ffc84ca9a173da82df6f91239c6b1fe6.tar.gz |
guix: import: Update texlive importer according to new build system.
* guix/import/texlive.scm (tlpdb->package): Generate a package that doesn't
need SIMPLE-TEXLIVE-PACKAGE.
* guix/import/utils.scm (package->definition): Remove special case for
`simple-texlive-package'.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package"): Update test.
("texlive->guix-package, no docfiles"): New test.
Diffstat (limited to 'guix/import')
-rw-r--r-- | guix/import/texlive.scm | 42 | ||||
-rw-r--r-- | guix/import/utils.scm | 3 |
2 files changed, 23 insertions, 22 deletions
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index 086cd363a9..e5fcb7adf8 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -275,33 +275,37 @@ of those files are returned that are unexpectedly installed." store ref (string-append name "-svn-multi-checkout"))))) (values `(package - (inherit (simple-texlive-package - ,name - (list ,@dirs) - (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 'srcfiles) '() '(#:trivial? #true)))) - ;; package->definition in (guix import utils) expects to see a - ;; version field. - (version ,version) + (name ,name) + (version (number->string %texlive-revision)) + (source (texlive-origin + name version + (list ,@(sort locs string<)) + (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) + '((outputs '("out" "doc"))) + '()) + (build-system texlive-build-system) ,@(match filtered-depends (() '()) (inputs `((propagated-inputs - (list ,@(map + (list ,@(map-in-order (lambda (tex-name) (let ((name (guix-name tex-name))) (string->symbol name))) - inputs)))))) - ,@(or (and=> (assoc-ref data 'name) + ;; Sort inputs alphabetically. + (reverse inputs))))))) + (home-page + ,(or (and=> (or (assoc-ref data 'catalogue) + (assoc-ref data 'name)) (lambda (name) - `((home-page ,(string-append "https://ctan.org/pkg/" - name))))) - '((home-page "https://www.tug.org/texlive/"))) + (string-append "https://ctan.org/pkg/" name))) + "https://www.tug.org/texlive/")) (synopsis ,(assoc-ref data 'shortdesc)) (description ,(and=> (assoc-ref data 'longdesc) beautify-description)) (license ,(and=> (assoc-ref data 'catalogue-license) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index e9a0a7ecd7..5176f12a31 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -436,10 +436,7 @@ APPEND-VERSION?/string is a string, append this string." (match guix-package ((or ('package ('name name) ('version version) . rest) - ('package ('inherit ('simple-texlive-package name . _)) - ('version version) . rest) ('let _ ('package ('name name) ('version version) . rest))) - `(define-public ,(string->symbol (cond ((string? append-version?/string) |