From 4f8c29a75c3647b104c43ebf615d4a63a5e056b3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 23 Sep 2019 21:22:28 +0200 Subject: show, search: Add '--load-path'. * guix/scripts/search.scm (show-help, %options): Add -L/--load-path. * guix/scripts/show.scm (show-help, %options): Add -L/--load-path. --- guix/scripts/search.scm | 11 ++++++++++- guix/scripts/show.scm | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/guix/scripts/search.scm b/guix/scripts/search.scm index 8fceb83668..827b2eb7a9 100644 --- a/guix/scripts/search.scm +++ b/guix/scripts/search.scm @@ -19,6 +19,8 @@ (define-module (guix scripts search) #:use-module (guix ui) #:use-module (guix scripts package) + #:use-module ((guix scripts build) + #:select (%standard-build-options)) #:use-module (guix scripts) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -36,6 +38,9 @@ This is an alias for 'guix package -s'.\n")) (display (G_ " -V, --version display version information and exit")) (newline) + (display (G_ " + -L, --load-path=DIR prepend DIR to the package module search path")) + (newline) (show-bug-report-information)) (define %options @@ -46,7 +51,11 @@ This is an alias for 'guix package -s'.\n")) (exit 0))) (option '(#\V "version") #f #f (lambda args - (show-version-and-exit "guix search"))))) + (show-version-and-exit "guix search"))) + + (find (lambda (option) + (member "load-path" (option-names option))) + %standard-build-options))) (define (guix-search . args) (define (handle-argument arg result) diff --git a/guix/scripts/show.scm b/guix/scripts/show.scm index 94f0559358..ef64b5755b 100644 --- a/guix/scripts/show.scm +++ b/guix/scripts/show.scm @@ -19,6 +19,8 @@ (define-module (guix scripts show) #:use-module (guix ui) #:use-module (guix scripts package) + #:use-module ((guix scripts build) + #:select (%standard-build-options)) #:use-module (guix scripts) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -36,6 +38,9 @@ This is an alias for 'guix package --show='.\n")) (display (G_ " -V, --version display version information and exit")) (newline) + (display (G_ " + -L, --load-path=DIR prepend DIR to the package module search path")) + (newline) (show-bug-report-information)) (define %options @@ -46,7 +51,11 @@ This is an alias for 'guix package --show='.\n")) (exit 0))) (option '(#\V "version") #f #f (lambda args - (show-version-and-exit "guix show"))))) + (show-version-and-exit "guix show"))) + + (find (lambda (option) + (member "load-path" (option-names option))) + %standard-build-options))) (define (guix-show . args) (define (handle-argument arg result) -- cgit v1.2.3