1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
nix/src/libstore/worker-protocol.hh
Eelco Dolstra 9e975458b4 * Get rid of the substitutes database table (NIX-47). Instead, if we
need any info on substitutable paths, we just call the substituters
  (such as download-using-manifests.pl) directly.  This means that
  it's no longer necessary for nix-pull to register substitutes or for
  nix-channel to clear them, which makes those operations much faster
  (NIX-95).  Also, we don't have to worry about keeping nix-pull
  manifests (in /nix/var/nix/manifests) and the database in sync with
  each other.

  The downside is that there is some overhead in calling an external
  program to get the substitutes info.  For instance, "nix-env -qas"
  takes a bit longer.

  Abolishing the substitutes table also makes the logic in
  local-store.cc simpler, as we don't need to store info for invalid
  paths.  On the downside, you cannot do things like "nix-store -qR"
  on a substitutable but invalid path (but nobody did that anyway).

* Never catch interrupts (the Interrupted exception).
2007-08-12 00:29:28 +00:00

54 lines
997 B
C++

#ifndef __WORKER_PROTOCOL_H
#define __WORKER_PROTOCOL_H
namespace nix {
#define WORKER_MAGIC_1 0x6e697864
#define WORKER_MAGIC_2 0x6478696e
typedef enum {
wopQuit,
wopIsValidPath,
wopHasSubstitutes,
wopQueryPathHash,
wopQueryReferences,
wopQueryReferrers,
wopAddToStore,
wopAddTextToStore,
wopBuildDerivations,
wopEnsurePath,
wopAddTempRoot,
wopAddIndirectRoot,
wopSyncWithGC,
wopFindRoots,
wopCollectGarbage,
wopExportPath,
wopImportPath,
wopQueryDeriver,
} WorkerOp;
#define STDERR_NEXT 0x6f6c6d67
#define STDERR_READ 0x64617461 // data needed from source
#define STDERR_WRITE 0x64617416 // data for sink
#define STDERR_LAST 0x616c7473
#define STDERR_ERROR 0x63787470
/* The default location of the daemon socket, relative to
nixStateDir. */
#define DEFAULT_SOCKET_PATH "/daemon.socket"
Path readStorePath(Source & from);
PathSet readStorePaths(Source & from);
}
#endif /* !__WORKER_PROTOCOL_H */