aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-09-24 11:26:30 +0200
committerLudovic Courtès <ludo@gnu.org>2014-09-24 14:06:09 +0200
commit300868ba57e3786dae399f3cac4fff39ad6c316f (patch)
treef7fb1e6d2e2e7cf0aec10f233d1286cd3f855b57 /tests/guix-package.sh
parentc107b54108f6640504371d414f8a47191b92dbb8 (diff)
downloadguix-300868ba57e3786dae399f3cac4fff39ad6c316f.tar
guix-300868ba57e3786dae399f3cac4fff39ad6c316f.tar.gz
guix build: Add -L/--load-path as a common option.
* guix/scripts/build.scm (show-build-options-help): Document -L. (%standard-build-options): Add -L/--load-path. * tests/guix-package.sh: Test it.
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 580aa506b3..59b71d842d 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -255,3 +255,22 @@ set -o pipefail || true
guix package -A g | head -1 2> "$HOME/err1"
guix package -I | head -1 2> "$HOME/err2"
test "`cat "$HOME/err1" "$HOME/err2"`" = ""
+
+# Make sure '-L' extends the package module search path.
+module_dir="t-guix-package-$$"
+mkdir "$module_dir"
+trap "rm -rf $module_dir" EXIT
+
+cat > "$module_dir/foo.scm"<<EOF
+(define-module (foo)
+ #:use-module (guix packages)
+ #:use-module (gnu packages emacs))
+
+(define-public x
+ (package (inherit emacs)
+ (name "emacs-foo-bar")
+ (version "42")))
+EOF
+
+guix package -A emacs-foo-bar -L "$module_dir" | grep 42
+guix package -i emacs-foo-bar-42 -n -L "$module_dir"