about summary refs log tree commit diff
path: root/tvix/Cargo.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/Cargo.nix')
-rw-r--r--tvix/Cargo.nix60
1 files changed, 41 insertions, 19 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix
index 075ca7219f4c..599da8108557 100644
--- a/tvix/Cargo.nix
+++ b/tvix/Cargo.nix
@@ -47,6 +47,16 @@ rec {
       # File a bug if you depend on any for non-debug work!
       debug = internal.debugCrate { inherit packageId; };
     };
+    "tvix-cli" = rec {
+      packageId = "tvix-cli";
+      build = internal.buildRustCrateWithFeatures {
+        packageId = "tvix-cli";
+      };
+
+      # 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-eval" = rec {
       packageId = "tvix-eval";
       build = internal.buildRustCrateWithFeatures {
@@ -4176,13 +4186,39 @@ rec {
         ];
 
       };
-      "tvix-eval" = rec {
-        crateName = "tvix-eval";
+      "tvix-cli" = rec {
+        crateName = "tvix-cli";
         version = "0.1.0";
         edition = "2021";
         crateBin = [
-          { name = "tvix-eval"; path = "src/main.rs"; }
+          { name = "tvix-cli"; path = "src/main.rs"; }
         ];
+        src = lib.cleanSourceWith { filter = sourceFilter; src = ./cli; };
+        dependencies = [
+          {
+            name = "clap";
+            packageId = "clap 3.2.23";
+            features = [ "derive" "env" ];
+          }
+          {
+            name = "dirs";
+            packageId = "dirs";
+          }
+          {
+            name = "rustyline";
+            packageId = "rustyline";
+          }
+          {
+            name = "tvix-eval";
+            packageId = "tvix-eval";
+          }
+        ];
+
+      };
+      "tvix-eval" = rec {
+        crateName = "tvix-eval";
+        version = "0.1.0";
+        edition = "2021";
         src = lib.cleanSourceWith { filter = sourceFilter; src = ./eval; };
         libName = "tvix_eval";
         dependencies = [
@@ -4192,12 +4228,6 @@ rec {
             optional = true;
           }
           {
-            name = "clap";
-            packageId = "clap 3.2.23";
-            optional = true;
-            features = [ "derive" "env" ];
-          }
-          {
             name = "codemap";
             packageId = "codemap";
           }
@@ -4233,11 +4263,6 @@ rec {
             packageId = "rowan";
           }
           {
-            name = "rustyline";
-            packageId = "rustyline";
-            optional = true;
-          }
-          {
             name = "serde";
             packageId = "serde";
           }
@@ -4290,14 +4315,11 @@ rec {
           "arbitrary" = [ "proptest" "test-strategy" ];
           "backtrace-on-stack-overflow" = [ "dep:backtrace-on-stack-overflow" ];
           "backtrace_overflow" = [ "backtrace-on-stack-overflow" ];
-          "clap" = [ "dep:clap" ];
-          "default" = [ "repl" "impure" "arbitrary" "nix_tests" "backtrace_overflow" ];
+          "default" = [ "impure" "arbitrary" "nix_tests" "backtrace_overflow" ];
           "proptest" = [ "dep:proptest" ];
-          "repl" = [ "rustyline" "clap" ];
-          "rustyline" = [ "dep:rustyline" ];
           "test-strategy" = [ "dep:test-strategy" ];
         };
-        resolvedDefaultFeatures = [ "arbitrary" "backtrace-on-stack-overflow" "backtrace_overflow" "clap" "default" "impure" "nix_tests" "proptest" "repl" "rustyline" "test-strategy" ];
+        resolvedDefaultFeatures = [ "arbitrary" "backtrace-on-stack-overflow" "backtrace_overflow" "default" "impure" "nix_tests" "proptest" "test-strategy" ];
       };
       "tvix-eval-builtin-macros" = rec {
         crateName = "tvix-eval-builtin-macros";