@@ -505,29 +505,6 @@ (define (validated-spec spec)
(exp
(pretty-print exp port)))))
-
-;;;
-;;; One-time hints.
-;;;
-
-(define (hint-directory)
- "Return the directory name where previously given hints are recorded."
- (string-append (cache-directory #:ensure? #f) "/hints"))
-
-(define (hint-file hint)
- "Return the name of the file that marks HINT as already printed."
- (string-append (hint-directory) "/" (symbol->string hint)))
-
-(define (record-hint hint)
- "Mark HINT as already given."
- (let ((file (hint-file hint)))
- (mkdir-p (dirname file))
- (close-fdes (open-fdes file (logior O_CREAT O_WRONLY)))))
-
-(define (hint-given? hint)
- "Return true if HINT was already given."
- (file-exists? (hint-file hint)))
-
(define-command (guix-shell . args)
(category development)
@@ -19,6 +19,7 @@
;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
;;; Copyright © 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2022 ( <paren@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -137,6 +138,11 @@ (define-module (guix ui)
switch-to-generation*
delete-generation*
+ hint-directory
+ hint-file
+ record-hint
+ hint-given?
+
%default-message-language
current-message-language
@@ -2057,6 +2063,29 @@ (define* (package-specification->name+version+output spec
(package-name->name+version name)))
(values name version sub-drv)))
+
+;;;
+;;; One-time hints.
+;;;
+
+(define (hint-directory)
+ "Return the directory name where previously given hints are recorded."
+ (string-append (cache-directory #:ensure? #f) "/hints"))
+
+(define (hint-file hint)
+ "Return the name of the file that marks HINT as already printed."
+ (string-append (hint-directory) "/" (symbol->string hint)))
+
+(define (record-hint hint)
+ "Mark HINT as already given."
+ (let ((file (hint-file hint)))
+ (mkdir-p (dirname file))
+ (close-fdes (open-fdes file (logior O_CREAT O_WRONLY)))))
+
+(define (hint-given? hint)
+ "Return true if HINT was already given."
+ (file-exists? (hint-file hint)))
+
;;;
;;; Command-line option processing.