refactor(tvix/nix-compat): absorb nar writer

Expose it at `nix_compat::nar::writer`.

Change-Id: I98a8acfa6277074f24608d64fb6c0082b41d10f5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7969
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-01-31 15:08:25 +01:00 committed by flokli
parent 1e28cc7ede
commit a23b7e17c0
8 changed files with 3 additions and 15 deletions

4
tvix/Cargo.lock generated
View file

@ -2675,10 +2675,6 @@ dependencies = [
"tvix-eval", "tvix-eval",
] ]
[[package]]
name = "tvix-nar"
version = "0.0.0"
[[package]] [[package]]
name = "tvix-serde" name = "tvix-serde"
version = "0.1.0" version = "0.1.0"

View file

@ -21,7 +21,6 @@ members = [
"cli", "cli",
"eval", "eval",
"eval/builtin-macros", "eval/builtin-macros",
"nar",
"nix_cli", "nix_cli",
"nix-compat", "nix-compat",
"serde", "serde",

View file

@ -1,4 +0,0 @@
[package]
name = "tvix-nar"
version = "0.0.0"
edition = "2021"

View file

@ -1,5 +0,0 @@
{ depot, ... }:
depot.tvix.crates.workspaceMembers.tvix-nar.build.override {
runTests = true;
}

View file

@ -1,3 +1,4 @@
pub mod derivation; pub mod derivation;
pub mod nar;
pub mod nixbase32; pub mod nixbase32;
pub mod store_path; pub mod store_path;

View file

@ -0,0 +1 @@
pub mod writer;

View file

@ -16,7 +16,7 @@
//! let mut sink: Vec<u8> = Vec::new(); //! let mut sink: Vec<u8> = Vec::new();
//! //!
//! // Instantiate writer for this output location. //! // Instantiate writer for this output location.
//! let mut nar = tvix_nar::open(&mut sink)?; //! let mut nar = nix_compat::nar::writer::open(&mut sink)?;
//! //!
//! // Acquire metadata for the single file to output, and pass it in a //! // Acquire metadata for the single file to output, and pass it in a
//! // `BufRead`-implementing type. //! // `BufRead`-implementing type.