hydra-eval-guile-jobs: Honor $NIX_STORE_DIR.

* src/script/hydra-eval-guile-jobs.in (strip-store-path): Honor
  $NIX_STORE_DIR.
This commit is contained in:
Ludovic Courtès 2014-04-08 18:16:44 +02:00
parent 4cf0d7c4b3
commit e3e8c1bc74

View file

@ -53,8 +53,10 @@ fails in our case, leading to the creation of empty (guix ...) modules."
(struct-ref drv 3)) (struct-ref drv 3))
(define strip-store-path (define strip-store-path
(let ((store-path-rx (let* ((store (or (getenv "NIX_STORE_DIR") "/nix/store"))
(make-regexp "^.*/nix/store/[^-]+-(.+)$"))) (store-path-rx
(make-regexp (string-append "^.*" (regexp-quote store)
"/[^-]+-(.+)$"))))
(lambda (path) (lambda (path)
(or (and=> (regexp-exec store-path-rx path) (or (and=> (regexp-exec store-path-rx path)
(lambda (match) (lambda (match)