2024-08-28 15:45:50 +02:00
|
|
|
extern crate self as nix_compat;
|
|
|
|
|
2023-07-31 15:46:39 +02:00
|
|
|
pub(crate) mod aterm;
|
2023-01-31 14:45:42 +01:00
|
|
|
pub mod derivation;
|
2023-01-31 15:08:25 +01:00
|
|
|
pub mod nar;
|
2023-10-27 12:54:31 +02:00
|
|
|
pub mod narinfo;
|
feat(nix-compat/nix_http): init parse_nar[info]_str
This moves the URL component parsing code we had in nar-bridge to
nix-compat.
We change the function signature to return an Option, not a
Result<_, StatusCode>.
This allows returning more appropriate error codes, as we can
ok_or(…) at the callsite, which we now do: on an upload to an
invalid path, we now return "unauthorized", while on a GET/HEAD, we
return "not found".
This also adds support to parse compression suffixes. While not
supported in nar-bridge, other users of nix-compat might very well want
to parse these paths.
Also fix the error message when parsing NAR urls, it mentioned 32, not
52, which is a copypasta error from the narinfo URL parsing code.
Change-Id: Id1be9a8044814b54ce68b125c52dfe933c9c4f74
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12260
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-21 10:06:12 +02:00
|
|
|
pub mod nix_http;
|
2023-01-31 12:18:03 +01:00
|
|
|
pub mod nixbase32;
|
2024-06-28 11:14:30 +02:00
|
|
|
pub mod nixcpp;
|
2023-02-01 00:21:47 +01:00
|
|
|
pub mod nixhash;
|
2024-04-12 14:38:40 +02:00
|
|
|
pub mod path_info;
|
2023-01-31 12:18:03 +01:00
|
|
|
pub mod store_path;
|
2024-04-10 13:54:11 +02:00
|
|
|
|
|
|
|
#[cfg(feature = "wire")]
|
2024-03-19 14:34:53 +01:00
|
|
|
pub mod wire;
|
2024-04-10 14:43:15 +02:00
|
|
|
|
|
|
|
#[cfg(feature = "wire")]
|
2024-07-20 11:25:04 +02:00
|
|
|
pub mod nix_daemon;
|
2024-04-10 14:43:15 +02:00
|
|
|
#[cfg(feature = "wire")]
|
|
|
|
pub use nix_daemon::worker_protocol;
|