mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-16 16:08:04 -05:00
import/cran: Add directory-needs-esbuild?.
* guix/import/cran.scm (directory-needs-esbuild?): New procedure. (source-dir->dependencies): Use it.
This commit is contained in:
parent
ce7e4b99f9
commit
6ce68a7a83
1 changed files with 8 additions and 0 deletions
|
@ -447,6 +447,13 @@ (define (directory-needs-fortran? dir)
|
|||
(() #f)
|
||||
(_ #t)))
|
||||
|
||||
(define (directory-needs-esbuild? dir)
|
||||
"Check if the directory DIR contains minified JavaScript files and thus
|
||||
needs a JavaScript compiler."
|
||||
(match (find-files dir "\\.min.js$")
|
||||
(() #f)
|
||||
(_ #t)))
|
||||
|
||||
(define (files-match-pattern? directory regexp . file-patterns)
|
||||
"Return #T if any of the files matching FILE-PATTERNS in the DIRECTORY match
|
||||
the given REGEXP."
|
||||
|
@ -479,6 +486,7 @@ (define (source-dir->dependencies dir)
|
|||
(values
|
||||
(if (directory-needs-zlib? dir) '("zlib") '())
|
||||
(append
|
||||
(if (directory-needs-esbuild? dir) '("esbuild") '())
|
||||
(if (directory-needs-pkg-config? dir) '("pkg-config") '())
|
||||
(if (directory-needs-fortran? dir) '("gfortran") '()))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue