From e3a87d770f8be330259ef92348e0cf0a392bb24d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 1 Jun 2018 23:03:31 +0200 Subject: self: Improve backtraces for 'imported-files'. * guix/self.scm (imported-files): Pass #:env-vars. --- guix/self.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/self.scm b/guix/self.scm index 3503fbda43..1b2a73e8f7 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -502,7 +502,8 @@ list of file-name/file-like objects suitable as inputs to 'imported-files'." ;; We're just copying files around, no need to substitute or offload it. (computed-file name build #:options '(#:local-build? #t - #:substitutable? #f))) + #:substitutable? #f + #:env-vars (("COLUMNS" . "200"))))) (define* (compiled-modules name module-tree modules #:optional -- cgit v1.2.3 From 8031b3fa3c01d084a557b53b72e9bf1bcd99aa1a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 2 Jun 2018 00:02:23 +0200 Subject: self: 'compiled-files' builds the given list of files. * guix/self.scm (compiled-files): Add 'module-files' parameter. [build]: 'process-directory' now honors MODULE-FILES instead of building any '.scm' file it sees. (scheme-node): Adjust accordingly. --- guix/self.scm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'guix') diff --git a/guix/self.scm b/guix/self.scm index 1b2a73e8f7..bf5b1be1f3 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -171,7 +171,8 @@ must be present in the search path." (source (imported-files (string-append name "-source") (append module-files extra-files)))) (node name modules source dependencies - (compiled-modules name source modules + (compiled-modules name source + (map car module-files) (map node-source dependencies) (map node-compiled dependencies) #:extensions extensions @@ -505,7 +506,7 @@ list of file-name/file-like objects suitable as inputs to 'imported-files'." #:substitutable? #f #:env-vars (("COLUMNS" . "200"))))) -(define* (compiled-modules name module-tree modules +(define* (compiled-modules name module-tree module-files #:optional (dependencies '()) (dependencies-compiled '()) @@ -513,6 +514,9 @@ list of file-name/file-like objects suitable as inputs to 'imported-files'." (extensions '()) ;full-blown Guile packages parallel? guile-for-build) + "Build all the MODULE-FILES from MODULE-TREE. MODULE-FILES must be a list +like '(\"guix/foo.scm\" \"gnu/bar.scm\") and MODULE-TREE is the directory +containing MODULE-FILES and possibly other files as well." ;; This is a non-monadic, enhanced version of 'compiled-file' from (guix ;; gexp). (define build @@ -543,16 +547,13 @@ list of file-name/file-like objects suitable as inputs to 'imported-files'." (* 100. (/ completed total)) total) (force-output)) - (define (process-directory directory output) - (let ((files (find-files directory "\\.scm$")) - (prefix (+ 1 (string-length directory)))) - ;; Hide compilation warnings. - (parameterize ((current-warning-port (%make-void-port "w"))) - (compile-files directory #$output - (map (cut string-drop <> prefix) files) - #:workers (parallel-job-count) - #:report-load report-load - #:report-compilation report-compilation)))) + (define (process-directory directory files output) + ;; Hide compilation warnings. + (parameterize ((current-warning-port (%make-void-port "w"))) + (compile-files directory #$output files + #:workers (parallel-job-count) + #:report-load report-load + #:report-compilation report-compilation))) (setvbuf (current-output-port) _IONBF) (setvbuf (current-error-port) _IONBF) @@ -580,7 +581,7 @@ list of file-name/file-like objects suitable as inputs to 'imported-files'." (mkdir #$output) (chdir #+module-tree) - (process-directory "." #$output) + (process-directory "." '#+module-files #$output) (newline)))) (computed-file name build -- cgit v1.2.3 From 1458f768c1049812166228b8526128b199518e50 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 2 Jun 2018 00:04:39 +0200 Subject: self: Include gnu/build/* in the result. Previously, modules like gnu/build/cross-toolchain.scm or gnu/build/svg.scm were missing from the result. * guix/self.scm (compiled-guix)[*system-modules*]: Add gnu/build/* to #:extra-files. (imported-files)[same-target?]: New procedure. [build]: Call 'delete-duplicates' on FILES. --- guix/self.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/self.scm b/guix/self.scm index bf5b1be1f3..a24e9c6147 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -314,7 +314,12 @@ list of file-name/file-like objects suitable as inputs to 'imported-files'." *extra-modules* *core-modules*) #:extensions dependencies #:extra-files - (file-imports source "gnu/system/examples" (const #t)) + (append (file-imports source "gnu/system/examples" + (const #t)) + + ;; Build-side code that we don't build. Some of + ;; these depend on guile-rsvg, the Shepherd, etc. + (file-imports source "gnu/build" (const #t))) #:guile-for-build guile-for-build)) @@ -482,6 +487,11 @@ list of file-name/file-like objects suitable as inputs to 'imported-files'." (define (imported-files name files) ;; This is a non-monadic, simplified version of 'imported-files' from (guix ;; gexp). + (define same-target? + (match-lambda* + (((file1 . _) (file2 . _)) + (string=? file1 file2)))) + (define build (with-imported-modules (source-module-closure '((guix build utils))) @@ -498,7 +508,7 @@ list of file-name/file-like objects suitable as inputs to 'imported-files'." ;; symlinks, as this makes a difference for ;; 'add-to-store'. (copy-file store-path final-path))) - '#$files)))) + '#$(delete-duplicates files same-target?))))) ;; We're just copying files around, no need to substitute or offload it. (computed-file name build -- cgit v1.2.3 From 41f17554d88795bf35fbfc3e05301a6d2f64cca0 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 2 Jun 2018 13:36:26 +0200 Subject: import: cran: Update to Bioconductor 3.7. * guix/import/cran.scm (%bioconductor-version): Update to 3.7. --- guix/import/cran.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/import/cran.scm b/guix/import/cran.scm index ec2b7e6029..49e5d2d358 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -128,9 +128,9 @@ package definition." (define %cran-url "http://cran.r-project.org/web/packages/") (define %bioconductor-url "https://bioconductor.org/packages/") -;; The latest Bioconductor release is 3.6. Bioconductor packages should be +;; The latest Bioconductor release is 3.7. Bioconductor packages should be ;; updated together. -(define %bioconductor-version "3.6") +(define %bioconductor-version "3.7") (define %bioconductor-packages-list-url (string-append "https://bioconductor.org/packages/" -- cgit v1.2.3