forked from lix-project/lix
e877c69d78
substituting for (obvious, really). * For greater efficiency, nix-pull/unnar will place the output in a path that is probably the same as what is actually needed, thus preventing a path copy. * Even if a output id is given in a Fix package expression, ensure that the resulting Nix derive expression has a different id. This is because Nix expressions that are semantically equivalent (i.e., build the same result) might be different w.r.t. efficiency or divergence. It is absolutely vital for the substitute mechanism that such expressions are not used interchangeably.
30 lines
890 B
C++
30 lines
890 B
C++
#ifndef __NORMALISE_H
|
|
#define __NORMALISE_H
|
|
|
|
#include "fstate.hh"
|
|
|
|
|
|
/* Normalise an fstate-expression, that is, return an equivalent
|
|
Slice. (For the meaning of `pending', see expandId()). */
|
|
Slice normaliseFState(FSId id, FSIdSet pending = FSIdSet());
|
|
|
|
/* Realise a Slice in the file system. */
|
|
void realiseSlice(const Slice & slice, FSIdSet pending = FSIdSet());
|
|
|
|
/* Get the list of root (output) paths of the given
|
|
fstate-expression. */
|
|
Strings fstatePaths(const FSId & id, bool normalise);
|
|
|
|
/* Get the list of paths referenced by the given fstate-expression. */
|
|
Strings fstateRefs(const FSId & id);
|
|
|
|
/* Return the list of the ids of all known fstate-expressions whose
|
|
output ids are completely contained in `ids'. */
|
|
FSIds findGenerators(const FSIds & ids);
|
|
|
|
/* Register a successor. */
|
|
void registerSuccessor(const FSId & id1, const FSId & id2);
|
|
|
|
|
|
#endif /* !__NORMALISE_H */
|