mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 12:39:36 -05:00
utils: Add a %guix-source-root-directory procedure.
* guix/utils.scm (%guix-source-root-directory): New procedure.
This commit is contained in:
parent
5bc1ede862
commit
d7c4e7a0c2
1 changed files with 5 additions and 0 deletions
|
@ -78,6 +78,7 @@ (define-module (guix utils)
|
||||||
substitute-keyword-arguments
|
substitute-keyword-arguments
|
||||||
ensure-keyword-arguments
|
ensure-keyword-arguments
|
||||||
|
|
||||||
|
%guix-source-root-directory
|
||||||
current-source-directory
|
current-source-directory
|
||||||
|
|
||||||
nix-system->gnu-triplet
|
nix-system->gnu-triplet
|
||||||
|
@ -1031,6 +1032,10 @@ (define (read! bv start n)
|
||||||
;;; Source location.
|
;;; Source location.
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
|
(define (%guix-source-root-directory)
|
||||||
|
"Return the source root directory of the Guix found in %load-path."
|
||||||
|
(dirname (absolute-dirname "guix/packages.scm")))
|
||||||
|
|
||||||
(define absolute-dirname
|
(define absolute-dirname
|
||||||
;; Memoize to avoid repeated 'stat' storms from 'search-path'.
|
;; Memoize to avoid repeated 'stat' storms from 'search-path'.
|
||||||
(mlambda (file)
|
(mlambda (file)
|
||||||
|
|
Loading…
Reference in a new issue