[PATCH RFC 0/4] Add AutoTeX.

  • Open
  • quality assurance status badge
Details
2 participants
  • Liliana Marie Prikler
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 18 Feb 00:16 +0100
(address . guix-patches@gnu.org)
cover.1708211806.git.liliana.prikler@gmail.com
Hi Guix,

this series adds AutoTeX, the "script" that arxiv uses to process
submitted papers. It's RFC, because I haven't actually tested it
with modular texlive yet (I previously used monolithic texlive to
test it) and the included test suite is kinda useless in that regard.

Cheers

Liliana Marie Prikler (4):
gnu: Add perl-text-pdf.
gnu: Add perl-cam-pdf.
gnu: Add perl-arxiv.
gnu: Add perl-tex-autotex.

gnu/local.mk | 1 +
gnu/packages/perl-tex.scm | 100 ++++++++++++++++++++++++++++++++++++++
gnu/packages/perl.scm | 40 +++++++++++++++
3 files changed, 141 insertions(+)
create mode 100644 gnu/packages/perl-tex.scm


base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c
--
2.41.0
L
L
Liliana Marie Prikler wrote on 17 Feb 23:48 +0100
[PATCH RFC 1/4] gnu: Add perl-text-pdf.
(address . 69212@debbugs.gnu.org)
596a07f4efb054f95e78af4bfcd65d8ac27f437b.1708211806.git.liliana.prikler@gmail.com
* gnu/packages/perl.scm (perl-text-pdf): New variable.
---
gnu/packages/perl.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 5b32d6ecec..4539dc83b2 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -10929,6 +10929,24 @@ (define-public perl-text-patch
by the standard @code{diff} utility.")
(license license:gpl2+)))
+(define-public perl-text-pdf
+ (package
+ (name "perl-text-pdf")
+ (version "0.31")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/B/BH/BHALLISSY/Text-PDF-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0s5cimfr4wwzgv15k30x83ncg1257jwsvmbmb86lp02rw5g537yz"))))
+ (build-system perl-build-system)
+ (home-page "https://metacpan.org/release/Text-PDF")
+ (synopsis "PDF Manipulation and generation")
+ (description "This package provides tools for interacting with existing
+PDF files.")
+ (license license:perl-license)))
+
(define-public perl-text-roman
(package
(name "perl-text-roman")
--
2.41.0
L
L
Liliana Marie Prikler wrote on 17 Feb 23:46 +0100
[PATCH RFC 2/4] gnu: Add perl-cam-pdf.
(address . 69212@debbugs.gnu.org)
18c993b473e69e308c37638977679871f0a29a74.1708211806.git.liliana.prikler@gmail.com
* gnu/packages/perl.scm (perl-cam-pdf): New variable.
---
gnu/packages/perl.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 4539dc83b2..e62fee137d 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -1139,6 +1139,28 @@ (define-public perl-cache-fastmmap
algorithm to keep the most used entries in the cache.")
(license (package-license perl))))
+(define-public perl-cam-pdf
+ (package
+ (name "perl-cam-pdf")
+ (version "1.60")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/C/CD/CDOLAN/CAM-PDF-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "12dv5ssf3y7yjz9mrrqnfzx8nf4ydk1qijf5fx59495671zzqsp7"))))
+ (build-system perl-build-system)
+ (native-inputs (list perl-module-build))
+ (propagated-inputs (list perl-crypt-rc4 perl-test-memory-cycle perl-test-pod
+ perl-test-pod-coverage perl-text-pdf))
+ (home-page "https://metacpan.org/release/CAM-PDF")
+ (synopsis "PDF manipulation library")
+ (description "This package provides readers and writers for PDF documents.
+It supports PDF up to version 1.5, but writes PDFs in a 1.4-compatible manner,
+thus possibly creating larger files.")
+ (license license:perl-license)))
+
(define-public perl-capture-tiny
(package
(name "perl-capture-tiny")
--
2.41.0
L
L
Liliana Marie Prikler wrote on 17 Feb 23:45 +0100
[PATCH RFC 3/4] gnu: Add perl-arxiv.
(address . 69212@debbugs.gnu.org)
24808bdbad7760f287615e15d5a1f698386185c3.1708211806.git.liliana.prikler@gmail.com
* gnu/packages/perl-tex.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register it here.
---
gnu/local.mk | 1 +
gnu/packages/perl-tex.scm | 44 +++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
create mode 100644 gnu/packages/perl-tex.scm

Toggle diff (64 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index becca7dd56..aec8e7eab6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -510,6 +510,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/perl-check.scm \
%D%/packages/perl-compression.scm \
%D%/packages/perl-maths.scm \
+ %D%/packages/perl-tex.scm \
%D%/packages/perl-web.scm \
%D%/packages/perl6.scm \
%D%/packages/photo.scm \
diff --git a/gnu/packages/perl-tex.scm b/gnu/packages/perl-tex.scm
new file mode 100644
index 0000000000..315d34856f
--- /dev/null
+++ b/gnu/packages/perl-tex.scm
@@ -0,0 +1,44 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages perl-tex)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix build-system perl)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages tex))
+
+(define-public perl-arxiv
+ (package
+ (name "perl-arxiv")
+ (version "1.01")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/S/SI/SIMEON/arXiv-" version
+ ".tar.gz"))
+ (sha256
+ (base32 "0swcgkncc0vk220g5jwpz9j5zyg2995csklmfv09lhwxf6ndrin2"))))
+ (build-system perl-build-system)
+ (home-page "https://metacpan.org/release/arXiv")
+ (synopsis "Utilities from arXiv.org")
+ (description "This package contains perl modules with utility procedures
+used by other perl software at arXiv.org, most notably AutoTeX.")
+ (license license:perl-license)))
--
2.41.0
L
L
Liliana Marie Prikler wrote on 18 Feb 00:16 +0100
[PATCH RFC 4/4] gnu: Add perl-tex-autotex.
(address . 69212@debbugs.gnu.org)
7a4a072fcc94161b25c4e1b6804aa5e3bd5aa204.1708211806.git.liliana.prikler@gmail.com
* gnu/packages/perl-tex.scm (perl-tex-autotex): New variable.
---
gnu/packages/perl-tex.scm | 56 +++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

Toggle diff (76 lines)
diff --git a/gnu/packages/perl-tex.scm b/gnu/packages/perl-tex.scm
index 315d34856f..c2f04547ad 100644
--- a/gnu/packages/perl-tex.scm
+++ b/gnu/packages/perl-tex.scm
@@ -19,9 +19,13 @@
(define-module (gnu packages perl-tex)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix build-system perl)
#:use-module (gnu packages)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages mail)
#:use-module (gnu packages perl)
#:use-module (gnu packages tex))
@@ -42,3 +46,55 @@ (define-public perl-arxiv
(description "This package contains perl modules with utility procedures
used by other perl software at arXiv.org, most notably AutoTeX.")
(license license:perl-license)))
+
+(define-public perl-tex-autotex
+ (package
+ (name "perl-tex-autotex")
+ (version "0.906.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/T/TS/TSCHWAND/TeX-AutoTeX-v" version
+ ".tar.gz"))
+ (sha256
+ (base32 "1iz64g0a22kb8h8gpkqrc9yxdyr3lvylznvlkpf2a9xanfjr5fki"))))
+ (build-system perl-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-config
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "lib/TeX/AutoTeX/Config.pm"
+ (("(\\$DEFAULT_BRANCH[ ]*=).*;" all assign)
+ ;; XXX: Get year or smth
+ (string-append assign " 'texlive/guix';"))
+ (("/opt/texlive/[0-9]*/bin/arch")
+ (dirname (search-input-file inputs "/bin/tex")))
+ (("^(\\$AUTOTEX_ENV_PATH[ ]*=).*;" all assign)
+ (string-append assign " '"
+ (string-join
+ (map (lambda (bin)
+ (dirname (search-input-file inputs bin)))
+ '("/bin/sh"
+ "/bin/sed"
+ ;; coreutils
+ "/bin/yes"))
+ ":")
+ "';"))
+ (("/usr/bin/sendmail")
+ (search-input-file inputs "/bin/sendmail"))))))))
+ (inputs (list bash-minimal coreutils sed sendmail
+ texlive-scheme-basic))
+ (propagated-inputs (list perl-arxiv perl-cam-pdf perl-class-accessor
+ perl-error))
+ (native-inputs (list perl-module-build))
+ (home-page "https://metacpan.org/release/TeX-AutoTeX")
+ (synopsis "Automatically process (La-)TeX sources")
+ (description "AutoTeX is the basis for arXiv's automatic (La-)TeX
+processing. The normal use is to point it at a directory with an assortment
+of files in it, and the @code{process} method will attempt to generate DVI,
+PostScript, or PDF from the input based on heuristics. The resulting file(s)
+remain in the same directory.")
+ (license license:gpl3+)))
--
2.41.0
N
N
Nicolas Goaziou wrote on 22 May 09:10 +0200
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 69212@debbugs.gnu.org)
87ikz69vae.fsf@nicolasgoaziou.fr
Hello,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (3 lines)
> + (inputs (list bash-minimal coreutils sed sendmail
> + texlive-scheme-basic))

Nitpick: even though they are equivalent, I think (texlive-updmap.cfg)
is more appropriate here. As a rule of thumb texlive-scheme-* and
texlive-collection-* are for users, whereas (texlive-updmap.cfg) is for
packages.

Regards,
--
Nicolas Goaziou
L
L
Liliana Marie Prikler wrote on 22 May 18:55 +0200
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 69212@debbugs.gnu.org)
642d0a88a2d6f09603a6a7b3fef9679e739b7ca1.camel@gmail.com
Am Mittwoch, dem 22.05.2024 um 09:10 +0200 schrieb Nicolas Goaziou:
Toggle quote (12 lines)
> Hello,
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > +   (inputs (list bash-minimal coreutils sed sendmail
> > +                 texlive-scheme-basic))
>
> Nitpick: even though they are equivalent, I think (texlive-
> updmap.cfg)
> is more appropriate here. As a rule of thumb texlive-scheme-* and
> texlive-collection-* are for users, whereas (texlive-updmap.cfg) is
> for packages.
Good to know. I'm just unsure which packages to feed it so as to get
all the autotex features (basically to get "what arxiv supports"),
hence why it's blocked atm.

Cheers
N
N
Nicolas Goaziou wrote on 23 May 11:56 +0200
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 69212@debbugs.gnu.org)
87bk4wam2r.fsf@nicolasgoaziou.fr
Hello,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (10 lines)
>> Nitpick: even though they are equivalent, I think (texlive-
>> updmap.cfg)
>> is more appropriate here. As a rule of thumb texlive-scheme-* and
>> texlive-collection-* are for users, whereas (texlive-updmap.cfg) is
>> for packages.

> Good to know. I'm just unsure which packages to feed it so as to get
> all the autotex features (basically to get "what arxiv supports"),
> hence why it's blocked atm.

Then what about not providing anything TeX Live related in the inputs,
and mention in package description that using this package require
a proper TeX intallation?

Regards,
--
Nicolas Goaziou
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69212@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69212
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch