ui: Factorize bug-report information in `--help'.
* guix/config.scm.in (%guix-home-page-url): New variable. * guix/ui.scm (show-bug-report-information): New procedure. * guix-build.in (show-help): Use it. * guix-download.in (show-help): Likewise. * guix-import.in (show-help): Likewise. * guix-package.in (show-help): Likewise.
This commit is contained in:
parent
706d0641cf
commit
3441e16497
|
@ -12,7 +12,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0" \
|
||||||
-c "(apply $main (cdr (command-line)))" "$@"
|
-c "(apply $main (cdr (command-line)))" "$@"
|
||||||
!#
|
!#
|
||||||
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
||||||
;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of Guix.
|
;;; This file is part of Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -104,8 +104,7 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
|
||||||
(display (_ "
|
(display (_ "
|
||||||
-V, --version display version information and exit"))
|
-V, --version display version information and exit"))
|
||||||
(newline)
|
(newline)
|
||||||
(format #t (_ "
|
(show-bug-report-information))
|
||||||
Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
|
|
||||||
|
|
||||||
(define %options
|
(define %options
|
||||||
;; Specifications of the command-line options.
|
;; Specifications of the command-line options.
|
||||||
|
|
|
@ -12,7 +12,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0" \
|
||||||
-c "(apply $main (cdr (command-line)))" "$@"
|
-c "(apply $main (cdr (command-line)))" "$@"
|
||||||
!#
|
!#
|
||||||
;;; Guix --- Nix package management from Guile.
|
;;; Guix --- Nix package management from Guile.
|
||||||
;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of Guix.
|
;;; This file is part of Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -90,8 +90,7 @@ and the hash of its contents.\n"))
|
||||||
(display (_ "
|
(display (_ "
|
||||||
-V, --version display version information and exit"))
|
-V, --version display version information and exit"))
|
||||||
(newline)
|
(newline)
|
||||||
(format #t (_ "
|
(show-bug-report-information))
|
||||||
Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
|
|
||||||
|
|
||||||
(define %options
|
(define %options
|
||||||
;; Specifications of the command-line options.
|
;; Specifications of the command-line options.
|
||||||
|
|
|
@ -12,7 +12,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0" \
|
||||||
-c "(apply $main (cdr (command-line)))" "$@"
|
-c "(apply $main (cdr (command-line)))" "$@"
|
||||||
!#
|
!#
|
||||||
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
||||||
;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of Guix.
|
;;; This file is part of Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -88,8 +88,7 @@ Import and convert the Nix expression ATTRIBUTE of NIXPKGS.\n"))
|
||||||
(display (_ "
|
(display (_ "
|
||||||
-V, --version display version information and exit"))
|
-V, --version display version information and exit"))
|
||||||
(newline)
|
(newline)
|
||||||
(format #t (_ "
|
(show-bug-report-information))
|
||||||
Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
|
|
||||||
|
|
||||||
(define %options
|
(define %options
|
||||||
;; Specification of the command-line options.
|
;; Specification of the command-line options.
|
||||||
|
|
|
@ -12,7 +12,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0" \
|
||||||
-c "(apply $main (cdr (command-line)))" "$@"
|
-c "(apply $main (cdr (command-line)))" "$@"
|
||||||
!#
|
!#
|
||||||
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
||||||
;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of Guix.
|
;;; This file is part of Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -217,8 +217,7 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
|
||||||
(display (_ "
|
(display (_ "
|
||||||
-V, --version display version information and exit"))
|
-V, --version display version information and exit"))
|
||||||
(newline)
|
(newline)
|
||||||
(format #t (_ "
|
(show-bug-report-information))
|
||||||
Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
|
|
||||||
|
|
||||||
(define %options
|
(define %options
|
||||||
;; Specification of the command-line options.
|
;; Specification of the command-line options.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
||||||
;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of Guix.
|
;;; This file is part of Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
#:export (%guix-package-name
|
#:export (%guix-package-name
|
||||||
%guix-version
|
%guix-version
|
||||||
%guix-bug-report-address
|
%guix-bug-report-address
|
||||||
|
%guix-home-page-url
|
||||||
%store-directory
|
%store-directory
|
||||||
%state-directory
|
%state-directory
|
||||||
%system
|
%system
|
||||||
|
@ -42,6 +43,9 @@
|
||||||
(define %guix-bug-report-address
|
(define %guix-bug-report-address
|
||||||
"@PACKAGE_BUGREPORT@")
|
"@PACKAGE_BUGREPORT@")
|
||||||
|
|
||||||
|
(define %guix-home-page-url
|
||||||
|
"@PACKAGE_URL@")
|
||||||
|
|
||||||
(define %store-directory
|
(define %store-directory
|
||||||
"@storedir@")
|
"@storedir@")
|
||||||
|
|
||||||
|
|
12
guix/ui.scm
12
guix/ui.scm
|
@ -1,5 +1,5 @@
|
||||||
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
||||||
;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of Guix.
|
;;; This file is part of Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
N_
|
N_
|
||||||
leave
|
leave
|
||||||
show-version-and-exit
|
show-version-and-exit
|
||||||
|
show-bug-report-information
|
||||||
call-with-error-handling
|
call-with-error-handling
|
||||||
with-error-handling
|
with-error-handling
|
||||||
location->string))
|
location->string))
|
||||||
|
@ -56,6 +57,15 @@
|
||||||
command %guix-package-name %guix-version)
|
command %guix-package-name %guix-version)
|
||||||
(exit 0))
|
(exit 0))
|
||||||
|
|
||||||
|
(define (show-bug-report-information)
|
||||||
|
(format #t (_ "
|
||||||
|
Report bugs to: ~a.") %guix-bug-report-address)
|
||||||
|
(format #t (_ "
|
||||||
|
~a home page: <~a>") %guix-package-name %guix-home-page-url)
|
||||||
|
(display (_ "
|
||||||
|
General help using GNU software: <http://www.gnu.org/gethelp/>"))
|
||||||
|
(newline))
|
||||||
|
|
||||||
(define (call-with-error-handling thunk)
|
(define (call-with-error-handling thunk)
|
||||||
"Call THUNK within a user-friendly error handler."
|
"Call THUNK within a user-friendly error handler."
|
||||||
(guard (c ((package-input-error? c)
|
(guard (c ((package-input-error? c)
|
||||||
|
|
|
@ -7,3 +7,4 @@ distro/packages/recutils.scm
|
||||||
guix/ui.scm
|
guix/ui.scm
|
||||||
guix-build.in
|
guix-build.in
|
||||||
guix-download.in
|
guix-download.in
|
||||||
|
guix-package.in
|
||||||
|
|
Loading…
Reference in New Issue