Crate nix_daemon
source ·Expand description
§nix-daemon
This library exposes an interface for directly talking to a Nix daemon.
- To connect to a
nix-daemon
, usenix::DaemonStore
(through theStore
trait). - To build your own store, and make it compatible with existing tools (eg.
nix-build
), implement theStore
trait and usenix::DaemonProtocolAdapter
.
The Store
protocol mirrors the interface of the latest protocol we support, and
may receive breaking changes to keep up.
However, as the Nix Daemon protocol is forward compatible, and will negotiate the highest protocol version supported by both ends at connection time, there’s no pressure to upgrade; unless compatibility is broken upstream, an old version of this crate should in theory be able to talk to newer Nix until the end of time.
The nix
module currently supports Protocol 1.35, and Nix 2.15+. Support for older
versions will be added in the future (in particular, Protocol 1.21, used by Nix 2.3).
Modules§
- Interfaces to nix-daemon (or compatible) Stores.
Structs§
- Returned from
Store::build_paths_with_results()
. - Passed to
Store::set_options()
. - Returned from
Store::query_missing()
. - A thrown exception from the daemon.
- PathInfo, like
nix path-info
would return. - Notification that a result of some kind (see
StderrResultType
) has been produced. - Notification that an Activity (such as a build) has started.
Enums§
- Passed to
Store::build_paths()
andStore::build_paths_with_results()
. - Status code for a
BuildResult
, returned fromStore::build_paths_with_results()
. - Error enum for the library.
- Real-time logging data returned from a
Progress
. - Type of a
Stderr::StartActivity
. - A raw field used in
StderrStartActivity
andStderrResult
. - Type of a
StderrResult
. - Verbosity of a
Stderr
.
Traits§
- An in-progress operation, which may produces a series of
Stderr
s before returning. - Helper methods for
Progress
. - Generic interface to a Nix store.