about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-01-31T14·08+0100
committerflokli <flokli@flokli.de>2023-01-31T15·18+0000
commita23b7e17c04453a4d5ea2d47a88c6c6874471c08 (patch)
tree6dfa0bd2273519b5cfd5d03ec0f661dad4739a26 /tvix
parent1e28cc7edee0763f1f907af34033acb3a278b546 (diff)
refactor(tvix/nix-compat): absorb nar writer r/5793
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
Diffstat (limited to 'tvix')
-rw-r--r--tvix/Cargo.lock4
-rw-r--r--tvix/Cargo.toml1
-rw-r--r--tvix/nar/Cargo.toml4
-rw-r--r--tvix/nar/default.nix5
-rw-r--r--tvix/nix-compat/src/lib.rs1
-rw-r--r--tvix/nix-compat/src/nar/mod.rs1
-rw-r--r--tvix/nix-compat/src/nar/writer/mod.rs (renamed from tvix/nar/src/lib.rs)2
-rw-r--r--tvix/nix-compat/src/nar/writer/wire.rs (renamed from tvix/nar/src/wire.rs)0
8 files changed, 3 insertions, 15 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock
index 7060c7731404..bc0bafc00eaf 100644
--- a/tvix/Cargo.lock
+++ b/tvix/Cargo.lock
@@ -2676,10 +2676,6 @@ dependencies = [
 ]
 
 [[package]]
-name = "tvix-nar"
-version = "0.0.0"
-
-[[package]]
 name = "tvix-serde"
 version = "0.1.0"
 dependencies = [
diff --git a/tvix/Cargo.toml b/tvix/Cargo.toml
index 079d36218bfd..314e329e6f2a 100644
--- a/tvix/Cargo.toml
+++ b/tvix/Cargo.toml
@@ -21,7 +21,6 @@ members = [
   "cli",
   "eval",
   "eval/builtin-macros",
-  "nar",
   "nix_cli",
   "nix-compat",
   "serde",
diff --git a/tvix/nar/Cargo.toml b/tvix/nar/Cargo.toml
deleted file mode 100644
index 6ec8072c3abc..000000000000
--- a/tvix/nar/Cargo.toml
+++ /dev/null
@@ -1,4 +0,0 @@
-[package]
-name = "tvix-nar"
-version = "0.0.0"
-edition = "2021"
diff --git a/tvix/nar/default.nix b/tvix/nar/default.nix
deleted file mode 100644
index 4d62add05982..000000000000
--- a/tvix/nar/default.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ depot, ... }:
-
-depot.tvix.crates.workspaceMembers.tvix-nar.build.override {
-  runTests = true;
-}
diff --git a/tvix/nix-compat/src/lib.rs b/tvix/nix-compat/src/lib.rs
index 59d687ee7fe2..60775ad90e05 100644
--- a/tvix/nix-compat/src/lib.rs
+++ b/tvix/nix-compat/src/lib.rs
@@ -1,3 +1,4 @@
 pub mod derivation;
+pub mod nar;
 pub mod nixbase32;
 pub mod store_path;
diff --git a/tvix/nix-compat/src/nar/mod.rs b/tvix/nix-compat/src/nar/mod.rs
new file mode 100644
index 000000000000..d3baa817825a
--- /dev/null
+++ b/tvix/nix-compat/src/nar/mod.rs
@@ -0,0 +1 @@
+pub mod writer;
diff --git a/tvix/nar/src/lib.rs b/tvix/nix-compat/src/nar/writer/mod.rs
index 62d2be50140e..9f9640e273bb 100644
--- a/tvix/nar/src/lib.rs
+++ b/tvix/nix-compat/src/nar/writer/mod.rs
@@ -16,7 +16,7 @@
 //! let mut sink: Vec<u8> = Vec::new();
 //!
 //! // 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
 //! // `BufRead`-implementing type.
diff --git a/tvix/nar/src/wire.rs b/tvix/nix-compat/src/nar/writer/wire.rs
index 98581ae3aa7c..98581ae3aa7c 100644
--- a/tvix/nar/src/wire.rs
+++ b/tvix/nix-compat/src/nar/writer/wire.rs