summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-11-21 22:44:15 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-11-21 22:44:15 +0100
commitb60d2bfff95c0859d7814c1fe9d0940c87edc2b4 (patch)
tree49d3339f93c9d9fad5c66609a1dc4964f2856f79 /guix/build
parent0c6ab52243353e3417e5a9733bb089e4771cc86e (diff)
parenta31b9dac1cbda07225fcdffe03d13d68c4eab981 (diff)
downloadguix-patches-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar
guix-patches-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/download.scm13
-rw-r--r--guix/build/emacs-build-system.scm42
2 files changed, 16 insertions, 39 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm
index a4c91550a6..141ef409d6 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -187,10 +187,13 @@ name decoding bug described at
DIRECTORY. Those authority certificates are checked when
'peer-certificate-status' is later called."
(let ((cred (make-certificate-credentials))
- (files (or (scandir directory
- (lambda (file)
- (string-suffix? ".pem" file)))
- '())))
+ (files (match (scandir directory (cut string-suffix? ".pem" <>))
+ ((or #f ())
+ ;; Some distros provide nothing but bundles (*.crt) under
+ ;; /etc/ssl/certs, so look for them.
+ (or (scandir directory (cut string-suffix? ".crt" <>))
+ '()))
+ (pem pem))))
(for-each (lambda (file)
(let ((file (string-append directory "/" file)))
;; Protect against dangling symlinks.
@@ -198,7 +201,7 @@ DIRECTORY. Those authority certificates are checked when
(set-certificate-credentials-x509-trust-file!*
cred file
x509-certificate-format/pem))))
- (or files '()))
+ files)
cred))
(define (peer-certificate session)
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 47a9eda9e6..f0c41812f1 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
-;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -74,40 +74,14 @@ archive, a directory, or an Emacs Lisp file."
#t)
(gnu:unpack #:source source)))
-(define* (set-emacs-load-path #:key source inputs #:allow-other-keys)
- (define (inputs->directories inputs)
- "Extract the directory part from INPUTS."
- (match inputs
- (((names . directories) ...) directories)))
-
- (define (input-directory->el-directory input-directory)
- "Return the correct Emacs Lisp directory in INPUT-DIRECTORY or #f, if there
-is no Emacs Lisp directory."
- (let ((legacy-elisp-directory (string-append input-directory %legacy-install-suffix))
- (guix-elisp-directory
- (string-append
- input-directory %install-suffix "/"
- (store-directory->elpa-name-version input-directory))))
- (cond
- ((file-exists? guix-elisp-directory) guix-elisp-directory)
- ((file-exists? legacy-elisp-directory) legacy-elisp-directory)
- (else #f))))
-
- (define (input-directories->el-directories input-directories)
- "Return the list of Emacs Lisp directories in INPUT-DIRECTORIES."
- (filter-map input-directory->el-directory input-directories))
-
- "Set the EMACSLOADPATH environment variable so that dependencies are found."
+(define* (add-source-to-load-path #:key dummy #:allow-other-keys)
+ "Augment the EMACSLOADPATH environment variable with the source directory."
(let* ((source-directory (getcwd))
- (input-elisp-directories (input-directories->el-directories
- (inputs->directories inputs)))
- (emacs-load-path-value
- (string-join
- (append input-elisp-directories (list source-directory))
- ":" 'suffix)))
+ (emacs-load-path-value (string-append (getenv "EMACSLOADPATH") ":"
+ source-directory)))
(setenv "EMACSLOADPATH" emacs-load-path-value)
- (format #t "environment variable `EMACSLOADPATH' set to ~a\n"
- emacs-load-path-value)))
+ (format #t "source directory ~s appended to the `EMACSLOADPATH' \
+environment variable\n" source-directory)))
(define* (build #:key outputs inputs #:allow-other-keys)
"Compile .el files."
@@ -269,7 +243,7 @@ second hyphen. This corresponds to 'name-version' as used in ELPA packages."
(define %standard-phases
(modify-phases gnu:%standard-phases
(replace 'unpack unpack)
- (add-after 'unpack 'set-emacs-load-path set-emacs-load-path)
+ (add-after 'unpack 'add-source-to-load-path add-source-to-load-path)
(delete 'bootstrap)
(delete 'configure)
;; Move the build phase after install: the .el files are byte compiled