about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nix_daemon/mod.rs
AgeCommit message (Collapse)AuthorFilesLines
2024-12-09 r/8989 refactor(nix-compat/nix-daemon): s/result/results/Florian Klink1-3/+3
There's more than one result in there. Change-Id: I5d519db51fda050ed293bfb52215a643882e0116 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12879 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-12-01 r/8970 chore(tvix/nix-compat): basic daemon handler testsVova Kryachko1-0/+5
This change adds tests for basic request/response handling as per nix daemon STDERR_* protocol. Change-Id: Ia6a1904e14955551b11f776b6ccb595fa8984513 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12852 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com>
2024-11-24 r/8964 feat(tvix/nix-daemon): New operation AddToStoreNarVova Kryachko1-1/+21
This operation is particularly used when invoking the following nix commands: ``` nix-store --add-fixed some-path nix-store --add-fixed --recursive some-path ``` Change-Id: I0f9b129c838c00e10415881f1e6e0d7bc1d7a3a6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12800 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-11-20 r/8944 chore(tvix/nix-daemon): Implement STDERR_READ protocolVova Kryachko1-0/+1
When sending nars over the wire to the nix-daemon, nix protocol versions 1.21 to 1.23 use this framing protocol. This change implements an AsyncRead for this protocol, to be used in AddToStoreNar and any other operations when necessary. Change-Id: I571f1adbb2343c14c98503d1a2c12eea4c783ec9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12813 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-11-13 r/8917 feat(nix-daemon): Implement more nix daemon operations.Vova Kryachko1-2/+195
In particular QueryPathFromHashPart, QueryValidPaths, QueryValidDerivers Change-Id: Ie6ad83cec5ce9580044b85e201e4e23394f87075 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12762 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu> Reviewed-by: flokli <flokli@flokli.de>
2024-11-12 r/8908 feat(nix-daemon): Implement QueryPathInfo and IsValidPath.Vova Kryachko1-2/+12
Change-Id: Ia601e2eae24a2bc13d8851b2e8ed9d6c1808bb35 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12745 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com> Tested-by: BuildkiteCI
2024-11-12 r/8907 feat(nix-daemon): Implement client handler.Vova Kryachko1-0/+7
This change includes only the basic nix handshake protocol handling and sets up a client session. The only supported operation at this point is SetOptions. Additional operations will be implemented in subsequent cls. Change-Id: I3eccd9e0ceb270c3865929543c702f1491768852 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12743 Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu> Reviewed-by: Brian Olsen <me@griff.name>
2024-11-10 r/8898 refactor(nix-compat): Move serialization machinery into wire.Vova Kryachko1-6/+0
This groups most `wire` feature gated logic into a single module. The nix_daemon module will be gated by a feature that adds nix-compat-derive as a dependency. All of this is a way to break the crate2nix dependency cycle between nix-compat and nix-compat-derive(which depends on nix-compat for its doctests). Change-Id: I95938a6f280c11967371ff21f8b5a19e6d3d3805 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12761 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-11-04 r/8893 feat(tvix/nix-compat): Add nix serialization supportBrian Olsen1-0/+1
This change implements the serialization part that is needed to implement the nix daemon protocol. Previously was add deserialization and derivers for that and this then adds the other part of that equation so that you can write types that can then be read using deserialization. Change-Id: I2917de634980a93822a4f5a8ad38897b9ce16d89 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12729 Autosubmit: Brian Olsen <me@griff.name> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-08-25 r/8585 feat(nix-compat): Add NixDeserialize and NixRead traitsBrian Olsen1-0/+2
Add a trait for deserializing a type from a daemon worker connection. This adds the NixDeserialize trait which is kind of like the serde Deserialize trait in that individual types are meant to implement it and it can potentially be derived in the future. The NixDeserialize trait takes something that implements NixRead as input so that you can among other things mock the reader. Change-Id: Ibb59e3562dfc822652f7d18039f00a1c0d422997 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11990 Autosubmit: Brian Olsen <me@griff.name> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-04-18 r/7955 feat(tvix/nix-compat/nix_daemon/version): add ProtocolVersionFlorian Klink1-0/+3
This provides a nice wrapper struct to deal with versions. Change-Id: I6acc03bc9f8d84a0583196073b52776c45d3fe92 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11454 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr>
2024-04-13 r/7897 refactor(tvix/nix-compat): move worker_protocol into nix_daemon modFlorian Klink1-0/+1
This doesn't have much to do with the plain "wire" format, it's merely one user of it. Also, use the more "public" `wire::` API to read/write bytes, strings, bools and u64s. Change-Id: I98dddcc3004dfde7a0c009958fe84a840f77b188 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11390 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Reviewed-by: Brian Olsen <me@griff.name>