about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-12-20T16·23+0300
committertazjin <tazjin@tvl.su>2022-12-21T14·08+0000
commita95dea719f1b44231c485e52816c5fff4cfe42dd (patch)
treec4193fe7325f9f660c532866c1817cea22cda11f
parentf467df06dcfa8383c3bd36e7877b8cf900e973c9 (diff)
chore(tvix/nar): add CI build target r/5450
Change-Id: Ic73a391da9a733cade26114ab1127907c8d62a57
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7598
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
-rw-r--r--tvix/Cargo.lock4
-rw-r--r--tvix/Cargo.nix22
-rw-r--r--tvix/Cargo.toml1
-rw-r--r--tvix/nar/Cargo.lock7
-rw-r--r--tvix/nar/Cargo.toml2
-rw-r--r--tvix/nar/default.nix5
6 files changed, 33 insertions, 8 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock
index f5a32107e167..b6815b245938 100644
--- a/tvix/Cargo.lock
+++ b/tvix/Cargo.lock
@@ -1533,6 +1533,10 @@ dependencies = [
 ]
 
 [[package]]
+name = "tvix-nar"
+version = "0.0.0"
+
+[[package]]
 name = "tvix-store"
 version = "0.1.0"
 dependencies = [
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix
index 886a39e428ff..084133c18669 100644
--- a/tvix/Cargo.nix
+++ b/tvix/Cargo.nix
@@ -73,6 +73,16 @@ rec {
       # File a bug if you depend on any for non-debug work!
       debug = internal.debugCrate { inherit packageId; };
     };
+    "tvix-nar" = rec {
+      packageId = "tvix-nar";
+      build = internal.buildRustCrateWithFeatures {
+        packageId = "tvix-nar";
+      };
+
+      # Debug support which might change between releases.
+      # File a bug if you depend on any for non-debug work!
+      debug = internal.debugCrate { inherit packageId; };
+    };
     "tvix-store" = rec {
       packageId = "tvix-store";
       build = internal.buildRustCrateWithFeatures {
@@ -4374,6 +4384,18 @@ rec {
         ];
 
       };
+      "tvix-nar" = rec {
+        crateName = "tvix-nar";
+        version = "0.0.0";
+        edition = "2021";
+        # We can't filter paths with references in Nix 2.4
+        # See https://github.com/NixOS/nix/issues/5410
+        src =
+          if (lib.versionOlder builtins.nixVersion "2.4pre20211007")
+          then lib.cleanSourceWith { filter = sourceFilter; src = ./nar; }
+          else ./nar;
+
+      };
       "tvix-store" = rec {
         crateName = "tvix-store";
         version = "0.1.0";
diff --git a/tvix/Cargo.toml b/tvix/Cargo.toml
index 178802dd56ee..3d39be16a86e 100644
--- a/tvix/Cargo.toml
+++ b/tvix/Cargo.toml
@@ -21,6 +21,7 @@ members = [
   "cli",
   "eval",
   "eval/builtin-macros",
+  "nar",
   "nix_cli",
   "store",
 ]
diff --git a/tvix/nar/Cargo.lock b/tvix/nar/Cargo.lock
deleted file mode 100644
index 1288e13db8de..000000000000
--- a/tvix/nar/Cargo.lock
+++ /dev/null
@@ -1,7 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 3
-
-[[package]]
-name = "tvix_nar"
-version = "0.0.0"
diff --git a/tvix/nar/Cargo.toml b/tvix/nar/Cargo.toml
index f27e9a0cb8a7..6ec8072c3abc 100644
--- a/tvix/nar/Cargo.toml
+++ b/tvix/nar/Cargo.toml
@@ -1,4 +1,4 @@
 [package]
-name = "tvix_nar"
+name = "tvix-nar"
 version = "0.0.0"
 edition = "2021"
diff --git a/tvix/nar/default.nix b/tvix/nar/default.nix
new file mode 100644
index 000000000000..4d62add05982
--- /dev/null
+++ b/tvix/nar/default.nix
@@ -0,0 +1,5 @@
+{ depot, ... }:
+
+depot.tvix.crates.workspaceMembers.tvix-nar.build.override {
+  runTests = true;
+}