packages: Use %store-directory.

* guix/packages.scm (patch-and-repack): Call %store-directory instead of
  duplicating its code.
This commit is contained in:
Taylan Ulrich Bayırlı/Kammer 2015-05-15 10:59:44 +02:00
parent 0272ee499d
commit 2fdcc6074e
1 changed files with 1 additions and 1 deletions

View File

@ -466,7 +466,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
;; SOURCE may be either a directory or a tarball. ;; SOURCE may be either a directory or a tarball.
(and (if (file-is-directory? #+source) (and (if (file-is-directory? #+source)
(let* ((store (or (getenv "NIX_STORE") "/gnu/store")) (let* ((store (%store-directory))
(len (+ 1 (string-length store))) (len (+ 1 (string-length store)))
(base (string-drop #+source len)) (base (string-drop #+source len))
(dash (string-index base #\-)) (dash (string-index base #\-))