build: `hydra.scm' changes %load-path to refer to itself.

* hydra.scm: Add `eval-when' clause.
master
Ludovic Courtès 2013-03-27 00:24:54 +01:00
parent da0a26d2a7
commit 0b5aa854a0
1 changed files with 10 additions and 1 deletions

View File

@ -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))