Archived
1
0
Fork 0

gnu: Add texlive-libkpathsea.

* gnu/packages/tex.scm (texlive-libkpathsea): New variable.
This commit is contained in:
Leo Prikler 2021-05-15 16:16:48 +02:00
parent 313d5e6286
commit e89036e2f1
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -460,6 +460,39 @@ This package contains the binaries.")
(license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
(home-page "https://www.tug.org/texlive/")))
(define-public texlive-libkpathsea
(package/inherit texlive-bin
(name "texlive-libkpathsea")
(source
(origin
(inherit (package-source texlive-bin))
(snippet
`(begin
,(origin-snippet (package-source texlive-bin))
(with-directory-excursion "texk"
(let ((preserved-directories '("." ".." "kpathsea")))
(for-each
delete-file-recursively
(scandir "."
(lambda (file)
(and (not (member file preserved-directories))
(eq? 'directory (stat:type (stat file)))))))))))))
(arguments
(substitute-keyword-arguments (package-arguments texlive-bin)
((#:configure-flags flags)
`(cons* "--disable-all-pkgs" "--enable-kpathsea"
"--enable-shared" ,flags))
((#:phases phases)
`(modify-phases %standard-phases
(add-after 'install 'post-install
(lambda* (#:key inputs outputs #:allow-other-keys)
(with-directory-excursion "texk/kpathsea"
(invoke "make" "install"))))))))
(inputs '())
(synopsis "Path searching library")
(description "kpathsea is a library, whose purpose is to return a filename
from a list of user-specified directories similar to how shells look up
executables. It is maintained as a part of TeX Live.")))
(define texlive-docstrip
(package