diff options
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build/texlive-build-system.scm | 32 | ||||
-rw-r--r-- | guix/profiles.scm | 48 |
2 files changed, 3 insertions, 77 deletions
diff --git a/guix/build/texlive-build-system.scm b/guix/build/texlive-build-system.scm index a4c81f07cd..4c255700bb 100644 --- a/guix/build/texlive-build-system.scm +++ b/guix/build/texlive-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,35 +41,8 @@ (string-append "&" format) file)) -(define* (configure #:key inputs #:allow-other-keys) - (let* ((out (string-append (getcwd) "/.texlive-union")) - (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf"))) - ;; Build a modifiable union of all inputs (but exclude bash) - (match inputs - (((names . directories) ...) - (union-build out (filter directory-exists? directories) - #:create-all-directories? #t - #:log-port (%make-void-port "w")))) - - ;; The configuration file "texmf.cnf" is provided by the - ;; "texlive-bin" package. We take it and override only the - ;; setting for TEXMFROOT and TEXMF. This file won't be consulted - ;; by default, though, so we still need to set TEXMFCNF. - (substitute* texmf.cnf - (("^TEXMFROOT = .*") - (string-append "TEXMFROOT = " out "/share\n")) - (("^TEXMF = .*") - "TEXMF = $TEXMFROOT/share/texmf-dist\n")) - (setenv "TEXMFCNF" (dirname texmf.cnf)) - (setenv "TEXMF" (string-append out "/share/texmf-dist")) - - ;; Don't truncate lines. - (setenv "error_line" "254") ; must be less than 255 - (setenv "half_error_line" "238") ; must be less than error_line - 15 - (setenv "max_print_line" "1000")) - (mkdir "build")) - (define* (build #:key inputs build-targets tex-format #:allow-other-keys) + (mkdir "build") (for-each (cut compile-with-latex tex-format <>) (if build-targets build-targets (scandir "." (cut string-suffix? ".ins" <>))))) @@ -85,7 +59,7 @@ (define %standard-phases (modify-phases gnu:%standard-phases (delete 'bootstrap) - (replace 'configure configure) + (delete 'configure) (replace 'build build) (delete 'check) (replace 'install install))) diff --git a/guix/profiles.scm b/guix/profiles.scm index 59a313ea08..deefce2e26 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1526,53 +1526,6 @@ the entries in MANIFEST." `((type . profile-hook) (hook . manual-database)))) -(define (texlive-configuration manifest) - "Return a derivation that builds a TeXlive configuration for the entries in -MANIFEST." - (define entry->texlive-input - (match-lambda - (($ <manifest-entry> name version output thing deps) - (if (string-prefix? "texlive-" name) - (cons (gexp-input thing output) - (append-map entry->texlive-input deps)) - '())))) - (define build - (with-imported-modules '((guix build utils) - (guix build union)) - #~(begin - (use-modules (guix build utils) - (guix build union)) - - ;; Build a modifiable union of all texlive inputs. We do this so - ;; that TeX live can resolve the parent and grandparent directories - ;; correctly. There might be a more elegant way to accomplish this. - (union-build #$output - '#$(append-map entry->texlive-input - (manifest-entries manifest)) - #:create-all-directories? #t - #:log-port (%make-void-port "w")) - (let ((texmf.cnf (string-append - #$output - "/share/texmf-dist/web2c/texmf.cnf"))) - (when (file-exists? texmf.cnf) - (substitute* texmf.cnf - (("^TEXMFROOT = .*") - (string-append "TEXMFROOT = " #$output "/share\n")) - (("^TEXMF = .*") - "TEXMF = $TEXMFROOT/share/texmf-dist\n")))) - #t))) - - (with-monad %store-monad - (if (any (cut string-prefix? "texlive-" <>) - (map manifest-entry-name (manifest-entries manifest))) - (gexp->derivation "texlive-configuration" build - #:substitutable? #f - #:local-build? #t - #:properties - `((type . profile-hook) - (hook . texlive-configuration))) - (return #f)))) - (define %default-profile-hooks ;; This is the list of derivation-returning procedures that are called by ;; default when making a non-empty profile. @@ -1584,7 +1537,6 @@ MANIFEST." glib-schemas gtk-icon-themes gtk-im-modules - texlive-configuration xdg-desktop-database xdg-mime-database)) |