summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-08-28 01:22:24 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-08-28 01:22:24 +0200
commit61fca0fd22b81bcc0201a336a02cac74b42c6a44 (patch)
tree67cca9c72282f24b9ceb0b1706c314537e8c37ea /guix
parent57dac1ee935edfab91e9b182c1f7c9ddae794656 (diff)
parent526ce419303ac511be8d51b41471022bed472e6b (diff)
downloadpatches-61fca0fd22b81bcc0201a336a02cac74b42c6a44.tar
patches-61fca0fd22b81bcc0201a336a02cac74b42c6a44.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix')
-rw-r--r--guix/cve.scm4
-rw-r--r--guix/scripts/pull.scm35
-rw-r--r--guix/self.scm24
3 files changed, 18 insertions, 45 deletions
diff --git a/guix/cve.scm b/guix/cve.scm
index 070acfeb3e..99754fa1f6 100644
--- a/guix/cve.scm
+++ b/guix/cve.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -61,7 +61,7 @@
(define (yearly-feed-uri year)
"Return the URI for the CVE feed for YEAR."
(string->uri
- (string-append "https://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-"
+ (string-append "https://nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-"
(number->string year) ".xml.gz")))
(define %current-year-ttl
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 433502b5de..ee68c21a4c 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -33,6 +33,8 @@
#:autoload (guix inferior) (open-inferior)
#:use-module (guix scripts build)
#:autoload (guix self) (whole-package)
+ #:use-module (guix git)
+ #:use-module (git)
#:use-module (gnu packages)
#:autoload (gnu packages ssh) (guile-ssh)
#:autoload (gnu packages tls) (gnutls)
@@ -55,37 +57,6 @@
#:use-module (ice-9 vlist)
#:export (guix-pull))
-(module-autoload! (resolve-module '(guix scripts pull))
- '(git) '(git-error? set-tls-certificate-locations!)
- '(guix git) '(latest-repository-commit))
-
-(define (ensure-guile-git!)
- ;; Previously Guile-Git was not a prerequisite. Thus, someone running 'guix
- ;; pull' on an old installation may be lacking Guile-Git. To address this,
- ;; we autoload things that depend on Guile-Git and check in the entry point
- ;; whether Guile-Git is available.
- ;;
- ;; TODO: Remove this hack when Guile-Git is widespread or enforced.
-
- (unless (false-if-exception (resolve-interface '(git)))
- (leave (G_ "Guile-Git is missing but it is now required by 'guix pull'.
-Install it by running:
-
- guix package -i ~a
- export GUILE_LOAD_PATH=$HOME/.guix-profile/share/guile/site/~a:$GUILE_LOAD_PATH
- export GUILE_LOAD_COMPILED_PATH=$HOME/.guix-profile/lib/guile/~a/site-ccache:$GUILE_LOAD_COMPILED_PATH
-\n")
- (match (effective-version)
- ("2.0" "guile2.0-git")
- (_ "guile-git"))
- (effective-version)
- (effective-version)))
-
- ;; XXX: For unclear reasons this is needed for
- ;; 'set-tls-certificate-locations!'.
- (module-use! (resolve-module '(guix scripts pull))
- (resolve-interface '(git))))
-
(define %repository-url
(or (getenv "GUIX_PULL_URL") "https://git.savannah.gnu.org/git/guix.git"))
@@ -467,8 +438,6 @@ and ALIST2 differ, display HEADING upfront."
(url (assoc-ref opts 'repository-url))
(ref (assoc-ref opts 'ref))
(cache (string-append (cache-directory) "/pull")))
- (ensure-guile-git!)
-
(cond ((assoc-ref opts 'query)
(process-query opts))
((assoc-ref opts 'dry-run?)
diff --git a/guix/self.scm b/guix/self.scm
index c800c452e6..5b088c413b 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -367,22 +367,26 @@ DOMAIN, a gettext domain."
guile (guile-version (effective-version)))
"Return the 'guix' command such that it adds MODULES and DEPENDENCIES in its
load path."
+ (define source-directories
+ (map (lambda (package)
+ (file-append package "/share/guile/site/"
+ guile-version))
+ dependencies))
+
+ (define object-directories
+ (map (lambda (package)
+ (file-append package "/lib/guile/"
+ guile-version "/site-ccache"))
+ dependencies))
+
(program-file "guix-command"
#~(begin
(set! %load-path
- (append '#$(map (lambda (package)
- (file-append package
- "/share/guile/site/"
- guile-version))
- dependencies)
+ (append (filter file-exists? '#$source-directories)
%load-path))
(set! %load-compiled-path
- (append '#$(map (lambda (package)
- (file-append package "/lib/guile/"
- guile-version
- "/site-ccache"))
- dependencies)
+ (append (filter file-exists? '#$object-directories)
%load-compiled-path))
(set! %load-path (cons #$modules %load-path))