Merge branch 'wip-texlive'
This commit is contained in:
commit
cf48ea9539
|
@ -2554,3 +2554,67 @@ Emacsy. It has a small C layer and most browser features are fully
|
||||||
programmable in Guile. It has hooks, keymaps, and self documentation
|
programmable in Guile. It has hooks, keymaps, and self documentation
|
||||||
features.")
|
features.")
|
||||||
(license license:gpl3+)))
|
(license license:gpl3+)))
|
||||||
|
|
||||||
|
(define-public guile-cv
|
||||||
|
(package
|
||||||
|
(name "guile-cv")
|
||||||
|
(version "0.2.1")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "mirror://gnu/guile-cv/guile-cv-"
|
||||||
|
version ".tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0qdf0s2h1xj5lbhnc1pfw69i3zg08pqy2y6869b92ydfis8r82j9"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments
|
||||||
|
`(#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'prepare-build
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(substitute* "configure"
|
||||||
|
(("SITEDIR=\"\\$datadir/guile-cv\"")
|
||||||
|
"SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
|
||||||
|
(("SITECCACHEDIR=\"\\$libdir/guile-cv/")
|
||||||
|
"SITECCACHEDIR=\"$libdir/"))
|
||||||
|
(substitute* "cv/init.scm"
|
||||||
|
(("\\(dynamic-link \"libvigra_c\"\\)")
|
||||||
|
(string-append "(dynamic-link \""
|
||||||
|
(assoc-ref inputs "vigra-c")
|
||||||
|
"/lib/libvigra_c\")"))
|
||||||
|
(("\\(dynamic-link \"libguile-cv\"\\)")
|
||||||
|
(format #f "~s"
|
||||||
|
`(dynamic-link
|
||||||
|
(format #f "~alibguile-cv"
|
||||||
|
(if (getenv "GUILE_CV_UNINSTALLED")
|
||||||
|
""
|
||||||
|
,(format #f "~a/lib/"
|
||||||
|
(assoc-ref outputs "out"))))))))
|
||||||
|
(setenv "GUILE_CV_UNINSTALLED" "1")
|
||||||
|
;; Only needed to satisfy the configure script.
|
||||||
|
(setenv "LD_LIBRARY_PATH"
|
||||||
|
(string-append (assoc-ref inputs "vigra-c") "/lib"))
|
||||||
|
#t)))))
|
||||||
|
(inputs
|
||||||
|
`(("vigra" ,vigra)
|
||||||
|
("vigra-c" ,vigra-c)
|
||||||
|
("guile" ,guile-2.2)))
|
||||||
|
(native-inputs
|
||||||
|
`(("texlive" ,(texlive-union (list texlive-booktabs
|
||||||
|
texlive-lm
|
||||||
|
texlive-siunitx
|
||||||
|
texlive-standalone
|
||||||
|
texlive-xcolor
|
||||||
|
texlive-fonts-iwona)))
|
||||||
|
("pkg-config" ,pkg-config)))
|
||||||
|
(propagated-inputs
|
||||||
|
`(("guile-lib" ,guile-lib)))
|
||||||
|
(home-page "https://www.gnu.org/software/guile-cv/")
|
||||||
|
(synopsis "Computer vision library for Guile")
|
||||||
|
(description "Guile-CV is a Computer Vision functional programming library
|
||||||
|
for the Guile Scheme language. It is based on Vigra (Vision with Generic
|
||||||
|
Algorithms), a C++ image processing and analysis library. Guile-CV contains
|
||||||
|
bindings to Vigra C (a C wrapper to most of the Vigra functionality) and is
|
||||||
|
enriched with pure Guile Scheme algorithms, all accessible through a nice,
|
||||||
|
clean and easy to use high level API.")
|
||||||
|
(license license:gpl3+)))
|
||||||
|
|
|
@ -2508,11 +2508,8 @@ formats.")
|
||||||
(license license:lppl)))
|
(license license:lppl)))
|
||||||
|
|
||||||
(define-public texlive-latex-base
|
(define-public texlive-latex-base
|
||||||
(package
|
(let ((template (simple-texlive-package
|
||||||
(name "texlive-latex-base")
|
"texlive-latex-base"
|
||||||
(version (number->string %texlive-revision))
|
|
||||||
(source (texlive-origin
|
|
||||||
name version
|
|
||||||
(list "/doc/latex/base/"
|
(list "/doc/latex/base/"
|
||||||
"/source/latex/base/"
|
"/source/latex/base/"
|
||||||
;; Almost all files in /tex/latex/base are generated, but
|
;; Almost all files in /tex/latex/base are generated, but
|
||||||
|
@ -2530,17 +2527,19 @@ formats.")
|
||||||
"/tex/latex/base/testpage.tex"
|
"/tex/latex/base/testpage.tex"
|
||||||
"/tex/latex/base/texsys.cfg")
|
"/tex/latex/base/texsys.cfg")
|
||||||
(base32
|
(base32
|
||||||
"0f8d41wk1gb7i6xq1a10drwhhayc50pg9nwzjkrqnxrv0pcc08w5")))
|
"0f8d41wk1gb7i6xq1a10drwhhayc50pg9nwzjkrqnxrv0pcc08w5")
|
||||||
(build-system gnu-build-system)
|
#:trivial? #t)))
|
||||||
|
(package
|
||||||
|
(inherit template)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((guix build gnu-build-system)
|
(substitute-keyword-arguments (package-arguments template)
|
||||||
|
((#:modules modules '())
|
||||||
|
'((guix build gnu-build-system)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(ice-9 match)
|
(ice-9 match)
|
||||||
(srfi srfi-26))
|
(srfi srfi-26)))
|
||||||
#:tests? #f ; no tests
|
((#:phases phases)
|
||||||
#:phases
|
`(modify-phases ,phases
|
||||||
(modify-phases %standard-phases
|
|
||||||
(delete 'configure)
|
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; Find required fonts
|
;; Find required fonts
|
||||||
|
@ -2604,7 +2603,7 @@ formats.")
|
||||||
;; We don't actually want to install it.
|
;; We don't actually want to install it.
|
||||||
(delete-file "web2c/fmtutil.cnf")
|
(delete-file "web2c/fmtutil.cnf")
|
||||||
#t))
|
#t))
|
||||||
(replace 'install
|
(add-after 'install 'install-more
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(root (string-append out "/share/texmf-dist"))
|
(root (string-append out "/share/texmf-dist"))
|
||||||
|
@ -2625,7 +2624,7 @@ formats.")
|
||||||
(find-files "build" ".*"))
|
(find-files "build" ".*"))
|
||||||
(for-each (cut install-file <> web2c)
|
(for-each (cut install-file <> web2c)
|
||||||
(find-files "web2c" ".*"))
|
(find-files "web2c" ".*"))
|
||||||
#t))))))
|
#t)))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("texlive-bin" ,texlive-bin)
|
`(("texlive-bin" ,texlive-bin)
|
||||||
("texlive-tex-ini-files" ,texlive-tex-ini-files)
|
("texlive-tex-ini-files" ,texlive-tex-ini-files)
|
||||||
|
@ -2715,7 +2714,7 @@ formats.")
|
||||||
packages which are considered \"part of the kernel\". This bundle, together
|
packages which are considered \"part of the kernel\". This bundle, together
|
||||||
with the required packages, constitutes what every LaTeX distribution should
|
with the required packages, constitutes what every LaTeX distribution should
|
||||||
contain.")
|
contain.")
|
||||||
(license license:lppl1.3c+)))
|
(license license:lppl1.3c+))))
|
||||||
|
|
||||||
(define-public texlive-latex-filecontents
|
(define-public texlive-latex-filecontents
|
||||||
(package
|
(package
|
||||||
|
@ -3568,7 +3567,10 @@ standard LaTeX packages."
|
||||||
;; the updmap.cfg file)
|
;; the updmap.cfg file)
|
||||||
(match (filter (match-lambda
|
(match (filter (match-lambda
|
||||||
((name . _)
|
((name . _)
|
||||||
(not (member name '("bash" "updmap.cfg")))))
|
(not (member name '("bash"
|
||||||
|
"coreutils"
|
||||||
|
"sed"
|
||||||
|
"updmap.cfg")))))
|
||||||
%build-inputs)
|
%build-inputs)
|
||||||
(((names . directories) ...)
|
(((names . directories) ...)
|
||||||
(union-build (assoc-ref %outputs "out")
|
(union-build (assoc-ref %outputs "out")
|
||||||
|
@ -3588,6 +3590,7 @@ standard LaTeX packages."
|
||||||
(setenv "PATH" (string-append
|
(setenv "PATH" (string-append
|
||||||
(assoc-ref %build-inputs "bash") "/bin:"
|
(assoc-ref %build-inputs "bash") "/bin:"
|
||||||
(assoc-ref %build-inputs "coreutils") "/bin:"
|
(assoc-ref %build-inputs "coreutils") "/bin:"
|
||||||
|
(assoc-ref %build-inputs "sed") "/bin:"
|
||||||
(string-append out "/bin")))
|
(string-append out "/bin")))
|
||||||
(for-each
|
(for-each
|
||||||
(cut wrap-program <>
|
(cut wrap-program <>
|
||||||
|
@ -3596,16 +3599,32 @@ standard LaTeX packages."
|
||||||
(find-files (string-append out "/bin") ".*"))
|
(find-files (string-append out "/bin") ".*"))
|
||||||
|
|
||||||
;; Remove invalid maps from config file.
|
;; Remove invalid maps from config file.
|
||||||
(let ((port (open-pipe* OPEN_WRITE "updmap-sys"
|
(let ((web2c (string-append out "/share/texmf-config/web2c/"))
|
||||||
|
(maproot (string-append out "/share/texmf-dist/fonts/map/")))
|
||||||
|
(mkdir-p web2c)
|
||||||
|
(copy-file
|
||||||
|
(assoc-ref %build-inputs "updmap.cfg")
|
||||||
|
(string-append web2c "updmap.cfg"))
|
||||||
|
(make-file-writable (string-append web2c "updmap.cfg"))
|
||||||
|
|
||||||
|
(let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
|
||||||
"--syncwithtrees"
|
"--syncwithtrees"
|
||||||
"--nohash"
|
"--nohash"
|
||||||
(assoc-ref %build-inputs "updmap.cfg"))))
|
(string-append "--cnffile=" web2c "updmap.cfg"))))
|
||||||
(display "Y\n" port)
|
(display "Y\n" port)
|
||||||
(when (not (zero? (status:exit-val (close-pipe port))))
|
(when (not (zero? (status:exit-val (close-pipe port))))
|
||||||
(error "failed to filter updmap.cfg")))
|
(error "failed to filter updmap.cfg")))
|
||||||
;; Generate maps.
|
;; Generate maps.
|
||||||
(invoke "updmap-sys" "--force"
|
(invoke "updmap-sys"
|
||||||
(string-append out "/share/texmf-config/web2c/updmap.cfg"))
|
(string-append "--cnffile=" web2c "updmap.cfg")
|
||||||
|
(string-append "--dvipdfmxoutputdir="
|
||||||
|
maproot "dvipdfmx/updmap/")
|
||||||
|
(string-append "--dvipsoutputdir="
|
||||||
|
maproot "dvips/updmap/")
|
||||||
|
(string-append "--pdftexoutputdir="
|
||||||
|
maproot "pdftex/updmap/"))
|
||||||
|
;; Having this file breaks all file lookups later.
|
||||||
|
(delete-file (string-append out "/share/texmf-dist/ls-R")))
|
||||||
#t))))
|
#t))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("bash" ,bash)
|
`(("bash" ,bash)
|
||||||
|
|
Loading…
Reference in New Issue