diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-03-02 23:57:23 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-03-03 00:18:30 +0100 |
commit | 94d609aba8e14963459c21863ab56da2b5f01517 (patch) | |
tree | 8f98c0f83bd4fc2c42d387685fa7751e96adf4dc /tests/guix-build.sh | |
parent | 49c4fd2aab0c99c32ec338949ff07bd89d2920f6 (diff) | |
download | patches-94d609aba8e14963459c21863ab56da2b5f01517.tar patches-94d609aba8e14963459c21863ab56da2b5f01517.tar.gz |
guix build: -S returns the replacement's source.
Reported by Mark H Weaver.
* guix/scripts/build.scm (options->derivations): When SRC and GRAFT? are
true, use the source of P's replacement.
* tests/guix-build.sh: Add test.
Diffstat (limited to 'tests/guix-build.sh')
-rw-r--r-- | tests/guix-build.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 5821e509af..ae75bcfab0 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -43,6 +43,7 @@ trap "rm -rf $module_dir" EXIT cat > "$module_dir/foo.scm"<<EOF (define-module (foo) + #:use-module (guix tests) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system trivial)) @@ -88,6 +89,10 @@ cat > "$module_dir/foo.scm"<<EOF (synopsis "Dummy package") (description "bar is a dummy package for testing.") (license #f))) + +(define-public baz + (dummy-package "baz" (replacement foo))) + EOF GUIX_PACKAGE_PATH="$module_dir" @@ -97,6 +102,10 @@ export GUIX_PACKAGE_PATH guix build -d -S foo guix build -d -S foo | grep -e 'foo\.tar\.gz' +# 'baz' has a replacement so we should be getting the replacement's source. +(unset GUIX_BUILD_OPTIONS; + test "`guix build -d -S baz`" = "`guix build -d -S foo`") + guix build -d --sources=package foo guix build -d --sources=package foo | grep -e 'foo\.tar\.gz' |