aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-03-27 00:24:54 +0100
committerLudovic Courtès <ludo@gnu.org>2013-03-27 00:24:54 +0100
commit0b5aa854a0387d10c48488f408ffa21367ea48ac (patch)
treed8ccdc315be5849d5c5ed86667b5239805e0ddc8
parentda0a26d2a7df8b8f269aa05a7bd13add97df5658 (diff)
downloadguix-0b5aa854a0387d10c48488f408ffa21367ea48ac.tar
guix-0b5aa854a0387d10c48488f408ffa21367ea48ac.tar.gz
build: `hydra.scm' changes %load-path to refer to itself.
* hydra.scm: Add `eval-when' clause.
-rw-r--r--hydra.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/hydra.scm b/hydra.scm
index 8e3be16b08..65042cbe88 100644
--- a/hydra.scm
+++ b/hydra.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +21,15 @@
;;; tool.
;;;
+;; Attempt to use our very own Guix modules.
+(eval-when (compile load eval)
+ (and=> (assoc-ref (current-source-location) 'filename)
+ (lambda (file)
+ (let ((dir (dirname file)))
+ (format (current-error-port) "prepending ~s to the load path~%"
+ dir)
+ (set! %load-path (cons dir %load-path))))))
+
(use-modules (guix store)
(guix packages)
((guix utils) #:select (%current-system))