diff options
author | Florian Klink <flokli@flokli.de> | 2023-01-31T11·18+0100 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2023-01-31T13·26+0000 |
commit | c27bacd905a14207edc56850fd4ef9383706b5c4 (patch) | |
tree | 197b49a52c0ab6a05196b82cbe2071b3eed5eaa0 /tvix/Cargo.nix | |
parent | 8ea93bb646456864088a2c93e9ab2c4ccae75cba (diff) |
refactor(tvix): introduce nix-compat crate r/5788
Move nixbase32 and store_path into this. This allows //tvix/cli to not pull in //tvix/store for now. Change-Id: Id3a32867205d95794bc0d33b21d4cb3d9bafd02a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7964 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/Cargo.nix')
-rw-r--r-- | tvix/Cargo.nix | 66 |
1 files changed, 58 insertions, 8 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix index e0895ac928fa..aa9fa9dbf84b 100644 --- a/tvix/Cargo.nix +++ b/tvix/Cargo.nix @@ -43,6 +43,16 @@ rec { # File a bug if you depend on any for non-debug work! debug = internal.debugCrate { inherit packageId; }; }; + "nix-compat" = rec { + packageId = "nix-compat"; + build = internal.buildRustCrateWithFeatures { + packageId = "nix-compat"; + }; + + # 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-cli" = rec { packageId = "tvix-cli"; build = internal.buildRustCrateWithFeatures { @@ -3725,6 +3735,46 @@ rec { features = { }; resolvedDefaultFeatures = [ "integration_tests" ]; }; + "nix-compat" = rec { + crateName = "nix-compat"; + version = "0.1.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 = ./nix-compat; } + else ./nix-compat; + dependencies = [ + { + name = "anyhow"; + packageId = "anyhow"; + } + { + name = "data-encoding"; + packageId = "data-encoding"; + } + { + name = "glob"; + packageId = "glob"; + } + { + name = "sha2"; + packageId = "sha2 0.10.6"; + } + { + name = "thiserror"; + packageId = "thiserror"; + } + ]; + devDependencies = [ + { + name = "test-case"; + packageId = "test-case"; + } + ]; + + }; "nom8" = rec { crateName = "nom8"; version = "0.2.0"; @@ -7745,10 +7795,6 @@ rec { name = "tvix-eval"; packageId = "tvix-eval"; } - { - name = "tvix-store-bin"; - packageId = "tvix-store-bin"; - } ]; }; @@ -7776,6 +7822,10 @@ rec { packageId = "glob"; } { + name = "nix-compat"; + packageId = "nix-compat"; + } + { name = "serde"; packageId = "serde"; features = [ "derive" ]; @@ -7788,10 +7838,6 @@ rec { name = "thiserror"; packageId = "thiserror"; } - { - name = "tvix-store-bin"; - packageId = "tvix-store-bin"; - } ]; devDependencies = [ { @@ -8061,6 +8107,10 @@ rec { packageId = "lazy_static"; } { + name = "nix-compat"; + packageId = "nix-compat"; + } + { name = "prost"; packageId = "prost"; } |