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§
- nix
- Interfaces to nix-daemon (or compatible) Stores.
Structs§
- Build
Result - Returned from
Store::build_paths_with_results()
. - Client
Settings - Passed to
Store::set_options()
. - Missing
- Returned from
Store::query_missing()
. - NixError
- A thrown exception from the daemon.
- Path
Info - PathInfo, like
nix path-info
would return. - Stderr
Result - Notification that a result of some kind (see
StderrResultType
) has been produced. - Stderr
Start Activity - Notification that an Activity (such as a build) has started.
Enums§
- Build
Mode - Passed to
Store::build_paths()
andStore::build_paths_with_results()
. - Build
Result Status - Status code for a
BuildResult
, returned fromStore::build_paths_with_results()
. - Error
- Error enum for the library.
- Stderr
- Real-time logging data returned from a
Progress
. - Stderr
Activity Type - Type of a
Stderr::StartActivity
. - Stderr
Field - A raw field used in
StderrStartActivity
andStderrResult
. - Stderr
Result Type - Type of a
StderrResult
. - Verbosity
- Verbosity of a
Stderr
.
Traits§
- Progress
- An in-progress operation, which may produces a series of
Stderr
s before returning. - Progress
Ext - Helper methods for
Progress
. - Store
- Generic interface to a Nix store.