diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2023-02-17 22:20:45 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2023-02-18 19:56:29 +0100 |
commit | 6ce68a7a83a6106da9abaa818e25084e882219b5 (patch) | |
tree | 7199e55583f775a70408876cb8fa7c738d8e023b /guix/import | |
parent | ce7e4b99f9748c38ba8985819a4060a7126ca2eb (diff) | |
download | guix-patches-6ce68a7a83a6106da9abaa818e25084e882219b5.tar guix-patches-6ce68a7a83a6106da9abaa818e25084e882219b5.tar.gz |
import/cran: Add directory-needs-esbuild?.
* guix/import/cran.scm (directory-needs-esbuild?): New procedure.
(source-dir->dependencies): Use it.
Diffstat (limited to 'guix/import')
-rw-r--r-- | guix/import/cran.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm index c4b36da12b..632d632163 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -447,6 +447,13 @@ empty list when the FIELD cannot be found." (() #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 @@ of package names for INPUTS and another list of names of NATIVE-INPUTS." (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") '())))) |