a5c6347ff0
This makes things more efficient (we don't need to use an SSH master connection, and we only start a single remote process) and gets rid of locking issues (the remote nix-store process will keep inputs and outputs locked as long as they're needed). It also makes it more or less secure to connect directly to the root account on the build machine, using a forced command (e.g. ‘command="nix-store --serve --write"’). This bypasses the Nix daemon and is therefore more efficient. Also, don't call nix-store to import the output paths.
21 lines
412 B
C++
21 lines
412 B
C++
#pragma once
|
|
|
|
namespace nix {
|
|
|
|
#define SERVE_MAGIC_1 0x390c9deb
|
|
#define SERVE_MAGIC_2 0x5452eecb
|
|
|
|
#define SERVE_PROTOCOL_VERSION 0x200
|
|
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
|
|
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
|
|
|
|
typedef enum {
|
|
cmdQueryValidPaths = 1,
|
|
cmdQueryPathInfos = 2,
|
|
cmdDumpStorePath = 3,
|
|
cmdImportPaths = 4,
|
|
cmdExportPaths = 5,
|
|
cmdBuildPaths = 6,
|
|
} ServeCommand;
|
|
|
|
}
|