From 20cbd4f5f4d08bc26c22eb40b6c1e55b02e93f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 1 Sep 2018 23:49:43 +0200 Subject: compile-as-derivation: Adjust %load-compiled-path. * build-aux/compile-as-derivation.scm: Set not only %load-path but also %load-compiled-path. This can avoid problems where a stale .go is loaded. --- build-aux/compile-as-derivation.scm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'build-aux') diff --git a/build-aux/compile-as-derivation.scm b/build-aux/compile-as-derivation.scm index 59a84b1415..d945a8c79c 100644 --- a/build-aux/compile-as-derivation.scm +++ b/build-aux/compile-as-derivation.scm @@ -20,13 +20,20 @@ (use-modules (srfi srfi-26)) -;; Add ~/.config/guix/latest to the search path. -(add-to-load-path - (and=> (or (getenv "XDG_CONFIG_HOME") - (and=> (getenv "HOME") - (cut string-append <> "/.config"))) - (cute string-append <> "/guix/current/share/guile/site/" - (effective-version)))) +;; Add ~/.config/guix/current to the search path. +(eval-when (expand load eval) + (and=> (or (getenv "XDG_CONFIG_HOME") + (and=> (getenv "HOME") + (cut string-append <> "/.config/guix/current"))) + (lambda (current) + (set! %load-path + (cons (string-append current "/share/guile/site/" + (effective-version)) + %load-path)) + (set! %load-compiled-path + (cons (string-append current "/lib/guile/" (effective-version) + "/site-ccache") + %load-compiled-path))))) (use-modules (guix) (guix ui) (guix git-download) -- cgit v1.2.3 From fe634eaf93ba40862acdf62d7f197c6f19f0651c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 27 Aug 2018 15:38:59 +0200 Subject: Add (guix describe) and use it to initialize '%package-search-path'. * guix/describe.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages.scm (%default-package-module-path): New variable. (%package-module-path): Honor 'package-path-entries'. * build-aux/update-NEWS.scm (main): Use %DEFAULT-PACKAGE-MODULE-PATH instead of (last (%package-module-path)). --- build-aux/update-NEWS.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'build-aux') diff --git a/build-aux/update-NEWS.scm b/build-aux/update-NEWS.scm index 2e8f68c9a8..a9dffef1d2 100644 --- a/build-aux/update-NEWS.scm +++ b/build-aux/update-NEWS.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017 Ludovic Courtès +;;; Copyright © 2017, 2018 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -128,11 +128,10 @@ paragraph." (define (main . args) (match args ((news-file data-directory) - ;; Don't browse things listed in the user's $GUIX_PACKAGE_PATH. Here we - ;; assume that the last item in (%package-module-path) is the distro - ;; directory. + ;; Don't browse things listed in the user's $GUIX_PACKAGE_PATH and + ;; in external channels. (parameterize ((%package-module-path - (list (last (%package-module-path))))) + %default-package-module-path)) (define (package-file version) (string-append data-directory "/packages-" version ".txt")) -- cgit v1.2.3