From a95dea719f1b44231c485e52816c5fff4cfe42dd Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 20 Dec 2022 19:23:07 +0300 Subject: chore(tvix/nar): add CI build target Change-Id: Ic73a391da9a733cade26114ab1127907c8d62a57 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7598 Reviewed-by: flokli Autosubmit: tazjin Tested-by: BuildkiteCI --- tvix/Cargo.lock | 4 ++++ tvix/Cargo.nix | 22 ++++++++++++++++++++++ tvix/Cargo.toml | 1 + tvix/nar/Cargo.lock | 7 ------- tvix/nar/Cargo.toml | 2 +- tvix/nar/default.nix | 5 +++++ 6 files changed, 33 insertions(+), 8 deletions(-) delete mode 100644 tvix/nar/Cargo.lock create mode 100644 tvix/nar/default.nix diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock index f5a32107e167..b6815b245938 100644 --- a/tvix/Cargo.lock +++ b/tvix/Cargo.lock @@ -1532,6 +1532,10 @@ dependencies = [ "tvix-eval", ] +[[package]] +name = "tvix-nar" +version = "0.0.0" + [[package]] name = "tvix-store" version = "0.1.0" 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 { @@ -4373,6 +4383,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"; 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; +} -- cgit 1.4.1