diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-08-17T13·12+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-08-17T15·19+0200 |
commit | 22d6e31fc6a9de2ee424984e629ccd2e394ba512 (patch) | |
tree | 0c8ea6b2799583edf3597f7723883ba4c1655c7e /src/libstore/derivations.hh | |
parent | ac841a46797a91eaddb3e0ad193c505fc49da597 (diff) |
Add a mechanism for derivation attributes to reference the derivation's outputs
For example, you can now say: configureFlags = "--prefix=${placeholder "out"} --includedir=${placeholder "dev"}"; The strings returned by the ‘placeholder’ builtin are replaced at build time by the actual store paths corresponding to the specified outputs. Previously, you had to work around the inability to self-reference by doing stuff like: preConfigure = '' configureFlags+=" --prefix $out --includedir=$dev" ''; or rely on ad-hoc variable interpolation semantics in Autoconf or Make (e.g. --prefix=\$(out)), which doesn't always work.
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r-- | src/libstore/derivations.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index 974de78c58d5..9717a81e469c 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -117,4 +117,6 @@ struct Sink; Source & readDerivation(Source & in, Store & store, BasicDerivation & drv); Sink & operator << (Sink & out, const BasicDerivation & drv); +std::string hashPlaceholder(const std::string & outputName); + } |