mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-31 16:42:38 -05:00
guix: import: Handle texlua and TCL scripts.
* guix/import/texlive.scm (linked-scripts): Also generate scripts from files with ".tlu" and ".tcl" extensions. (tlpdb->package): Add appropriate inputs when providing a TCL script.
This commit is contained in:
parent
22c752fde1
commit
026ed35ddb
1 changed files with 9 additions and 7 deletions
|
@ -292,7 +292,8 @@ (define (formats package-data)
|
|||
(define (linked-scripts name package-database)
|
||||
"Return a list of script names to symlink from \"bin/\" directory for
|
||||
package NAME according to PACKAGE-DATABASE. Consider as scripts files with
|
||||
\".lua\", \".pl\", \".py\", \".sh\" extensions, and files without extension."
|
||||
\".lua\", \".pl\", \".py\", \".sh\", \".tcl\", \".tlu\" extensions, and files
|
||||
without extension."
|
||||
(and-let* ((data (assoc-ref package-database name))
|
||||
;; Check if binaries are associated to the package.
|
||||
(depend (assoc-ref data 'depend))
|
||||
|
@ -310,7 +311,7 @@ (define (linked-scripts name package-database)
|
|||
(filter-map (lambda (script)
|
||||
(and (any (lambda (ext)
|
||||
(member (basename script ext) binaries))
|
||||
'(".lua" ".pl" ".py" ".sh"))
|
||||
'(".lua" ".pl" ".py" ".sh" ".tcl" ".tlu"))
|
||||
(basename script)))
|
||||
;; Get the right (alphabetic) order.
|
||||
(reverse scripts))))
|
||||
|
@ -466,13 +467,14 @@ (define (tlpdb->package name version package-database)
|
|||
'((native-inputs (list texlive-metafont))))
|
||||
'())
|
||||
;; Inputs.
|
||||
,@(match (filter-map (lambda (s)
|
||||
(cond ((string-suffix? ".pl" s) 'perl)
|
||||
((string-suffix? ".py" s) 'python)
|
||||
(else #f)))
|
||||
,@(match (append-map (lambda (s)
|
||||
(cond ((string-suffix? ".pl" s) '(perl))
|
||||
((string-suffix? ".py" s) '(python))
|
||||
((string-suffix? ".tcl" s) '(tcl tk))
|
||||
(else '())))
|
||||
(or scripts '()))
|
||||
(() '())
|
||||
(inputs `((inputs (list ,@inputs)))))
|
||||
(inputs `((inputs (list ,@(delete-duplicates inputs eq?))))))
|
||||
;; Propagated inputs.
|
||||
,@(match (translate-depends depends)
|
||||
(() '())
|
||||
|
|
Loading…
Reference in a new issue