summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorJakub Kądziołka <kuba@kadziolka.net>2020-06-22 02:56:22 +0200
committerJakub Kądziołka <kuba@kadziolka.net>2020-06-22 02:56:22 +0200
commit43bc7855113bd725d464dd9eaa1e54e78edfaab1 (patch)
tree2655f85e9946ececdb4fb052c2f3e31375c41e0f /guix/build
parent0c4e39c0b025fb23a2e5df46434fc96112bb6d6c (diff)
parentf8a28b6c6d4fe7642b7df35e8518e3c0174ede74 (diff)
downloadguix-patches-43bc7855113bd725d464dd9eaa1e54e78edfaab1.tar
guix-patches-43bc7855113bd725d464dd9eaa1e54e78edfaab1.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/gnu-dist.scm46
-rw-r--r--guix/build/lisp-utils.scm22
-rw-r--r--guix/build/profiles.scm6
3 files changed, 27 insertions, 47 deletions
diff --git a/guix/build/gnu-dist.scm b/guix/build/gnu-dist.scm
index bf1c63cb85..fce1cd0759 100644
--- a/guix/build/gnu-dist.scm
+++ b/guix/build/gnu-dist.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -30,26 +30,6 @@
;;;
;;; Code:
-(define* (copy-source #:key source #:allow-other-keys)
- (copy-recursively source "."))
-
-(define* (autoreconf #:rest args)
- (letrec-syntax ((try-files (syntax-rules (else)
- ((_ (else fallback ...))
- (begin fallback ...))
- ((_ file files ... (else fallback ...))
- (if (file-exists? file)
- (begin
- (format #t "bootstrapping with `~a'...~%"
- file)
- (invoke (string-append "./" file)))
- (try-files files ...
- (else fallback ...)))))))
- (try-files "bootstrap" "bootstrap.sh" "autogen" "autogen.sh"
- (else
- (format #t "bootstrapping with `autoreconf'...~%")
- (invoke "autoreconf" "-vfi")))))
-
(define* (build #:key build-before-dist? make-flags (dist-target "distcheck")
#:allow-other-keys
#:rest args)
@@ -60,23 +40,10 @@
(apply invoke "make" dist-target make-flags))
(define* (install-dist #:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (meta (string-append out "/nix-support")) ; Hydra meta-data
- (tarballs (find-files "." "\\.tar\\.")))
- (mkdir out)
+ (let ((out (assoc-ref outputs "out")))
(for-each (lambda (tarball)
- (copy-file tarball (string-append out "/" tarball)))
- out)
-
- (mkdir meta)
- (call-with-output-file (string-append out "/hydra-build-products")
- (lambda (port)
- (for-each (lambda (tarball)
- ;; This tells Hydra's what kind of build products we have,
- ;; so it can represent them nicely. See `product-list.tt'
- ;; in Hydra for details.
- (format port "file source-dist ~a/~a~%" out tarball))
- tarballs)))
+ (install-file tarball out))
+ (find-files "." "\\.tar\\."))
#t))
(define %dist-phases
@@ -84,8 +51,7 @@
(modify-phases %standard-phases
(delete 'strip)
(replace 'install install-dist)
- (replace 'build build)
- (add-before 'configure 'autoreconf autoreconf)
- (replace 'unpack copy-source)))
+ (add-after 'build 'build-dist build)
+ (delete 'build)))
;;; gnu-dist.scm ends here
diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm
index c7a589c902..5bb3d81c9e 100644
--- a/guix/build/lisp-utils.scm
+++ b/guix/build/lisp-utils.scm
@@ -186,13 +186,17 @@ asdf:system-depends-on. First load the system's ASD-FILE."
(_ system))))
(define* (generate-system-definition system
- #:key version dependencies)
+ #:key version dependencies component?)
`(asdf:defsystem
,(normalize-string system)
- :class asdf/bundle:prebuilt-system
+ ,@(if component?
+ '(:class asdf/bundle:prebuilt-system)
+ '())
:version ,version
:depends-on ,dependencies
- :components ((:compiled-file ,(compiled-system system)))
+ ,@(if component?
+ `(:components ((:compiled-file ,(compiled-system system))))
+ '())
,@(if (string=? "ecl" (%lisp-type))
`(:lib ,(string-append system ".a"))
'())))
@@ -311,14 +315,20 @@ system to find its dependencies, as described by GENERATE-DEPENDENCY-LINKS."
lisp-input-map)
(map dependency-name dependencies)))
+ ;; Ensure directory exists, which might not be the case for an .asd without components.
+ (mkdir-p (dirname asd-file))
(call-with-output-file asd-file
(lambda (port)
(display
(replace-escaped-macros
(format #f "~y~%~y~%"
- (generate-system-definition system
- #:version version
- #:dependencies dependencies)
+ (generate-system-definition
+ system
+ #:version version
+ #:dependencies dependencies
+ ;; Some .asd don't have components, and thus they don't generate any .fasl.
+ #:component? (pair?
+ (find-files (dirname asd-file) "--system\\.fasl$")))
(generate-dependency-links registry system)))
port))))
diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm
index 1dc7976879..67ee9b665a 100644
--- a/guix/build/profiles.scm
+++ b/guix/build/profiles.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -167,6 +167,10 @@ SEARCH-PATHS."
;; Store meta-data.
(call-with-output-file manifest-file
(lambda (p)
+ (display "\
+;; This file was automatically generated and is for internal use only.
+;; It cannot be passed to the '--manifest' option.\n\n"
+ p)
(pretty-print manifest p)))
;; Make sure we can write to 'OUTPUT/etc'. 'union-build' above could have