summaryrefslogtreecommitdiff
path: root/lib/spack/docs/packaging_guide.rst
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2016-08-30 07:40:50 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2016-08-29 22:40:50 -0700
commit3ecf4ef8c9557c0b73a3eeea7efc0dbe91d9ee2a (patch)
treefa32a766fcfa47e1b9aada4cf2841f472f1207f1 /lib/spack/docs/packaging_guide.rst
parent8ab47537c758fddb8d8eb8eff481a092e52cd793 (diff)
downloadspack-3ecf4ef8c9557c0b73a3eeea7efc0dbe91d9ee2a.tar.gz
spack-3ecf4ef8c9557c0b73a3eeea7efc0dbe91d9ee2a.tar.bz2
spack-3ecf4ef8c9557c0b73a3eeea7efc0dbe91d9ee2a.tar.xz
spack-3ecf4ef8c9557c0b73a3eeea7efc0dbe91d9ee2a.zip
resources : added docs fixes #1551 (#1627)
Diffstat (limited to 'lib/spack/docs/packaging_guide.rst')
-rw-r--r--lib/spack/docs/packaging_guide.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index 879beb2476..34fcb1e101 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -759,6 +759,26 @@ Fetching a revision
Subversion branches are handled as part of the directory structure, so
you can check out a branch or tag by changing the ``url``.
+Expanding additional resources in the source tree
+-------------------------------------------------
+
+Some packages (most notably compilers) provide optional features if additional
+resources are expanded within their source tree before building. In Spack it is
+possible to describe such a need with the ``resource`` directive :
+
+ .. code-block:: python
+
+ resource(
+ name='cargo',
+ git='https://github.com/rust-lang/cargo.git',
+ tag='0.10.0',
+ destination='cargo'
+ )
+
+Based on the keywords present among the arguments the appropriate ``FetchStrategy``
+will be used for the resource. The keyword ``destination`` is relative to the source
+root of the package and should point to where the resource is to be expanded.
+
Automatic caching of files fetched during installation
------------------------------------------------------