tvl-depot/tvix/glue/Cargo.toml

59 lines
1.6 KiB
TOML
Raw Normal View History

[package]
name = "tvix-glue"
version = "0.1.0"
edition = "2021"
[dependencies]
async-compression = { version = "0.4.9", features = ["tokio", "gzip", "bzip2", "xz"]}
feat(tvix/glue/derivationStrict): support __structuredAttrs This adds support to handle the __structuredAttrs argument, which can be passed to builtins.derivationStrict. If __structuredAttrs is passed, and set to true, most of the arguments passed to builtins.derivationStrict are not simply coerced to a string and passed down to "environments", but instead kept in a more structured fashion. Inside ATerm, which is what's relevant as far as path calculation is concerned, a virtual `__json` environment variable is present, containing these structured values. Inside Builds, these structured values are not made available as an environment variable, but a JSON file (and source-able bash script). This will need to be respected once we start emitting BuildRequests, and for that we can probably just parse the `__json` key in Derivation.environment again - or keep this additionally in non-serialized form around during Evaluation. No matter what, this is left for a followup CL. The existing handle_derivation_parameters and populate_outputs helper function were removed, as __structuredAttrs causes quite a change in behaviour, and so handling both in the same place makes it more readable. There's some open questions w.r.t. string contexts for structured attrs itself. A TODO is left for this, but at least path calculation for individual structured attrs derivations are correct now. Part of b/366. Change-Id: Ic293822266ced6f8c4826d8ef0d2e098a4adccaa Reviewed-on: https://cl.tvl.fyi/c/depot/+/10604 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-01-11 14:44:31 +01:00
bstr = "1.6.0"
bytes = "1.4.0"
data-encoding = "2.6.0"
futures = "0.3.30"
magic = "0.16.2"
nix-compat = { path = "../nix-compat" }
pin-project = "1.1"
reqwest = { version = "0.12.0", features = ["rustls-tls-native-roots"], default-features = false }
tvix-build = { path = "../build", default-features = false, features = []}
tvix-eval = { path = "../eval" }
tvix-castore = { path = "../castore" }
tvix-store = { path = "../store", default-features = false, features = []}
tvix-tracing = { path = "../tracing" }
tracing = "0.1.37"
tracing-indicatif = "0.3.6"
tokio = "1.28.0"
tokio-tar = "0.3.1"
2024-02-23 16:09:20 +01:00
tokio-util = { version = "0.7.9", features = ["io", "io-util", "compat"] }
thiserror = "1.0.38"
feat(tvix/glue/derivationStrict): support __structuredAttrs This adds support to handle the __structuredAttrs argument, which can be passed to builtins.derivationStrict. If __structuredAttrs is passed, and set to true, most of the arguments passed to builtins.derivationStrict are not simply coerced to a string and passed down to "environments", but instead kept in a more structured fashion. Inside ATerm, which is what's relevant as far as path calculation is concerned, a virtual `__json` environment variable is present, containing these structured values. Inside Builds, these structured values are not made available as an environment variable, but a JSON file (and source-able bash script). This will need to be respected once we start emitting BuildRequests, and for that we can probably just parse the `__json` key in Derivation.environment again - or keep this additionally in non-serialized form around during Evaluation. No matter what, this is left for a followup CL. The existing handle_derivation_parameters and populate_outputs helper function were removed, as __structuredAttrs causes quite a change in behaviour, and so handling both in the same place makes it more readable. There's some open questions w.r.t. string contexts for structured attrs itself. A TODO is left for this, but at least path calculation for individual structured attrs derivations are correct now. Part of b/366. Change-Id: Ic293822266ced6f8c4826d8ef0d2e098a4adccaa Reviewed-on: https://cl.tvl.fyi/c/depot/+/10604 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-01-11 14:44:31 +01:00
serde = "1.0.195"
serde_json = "1.0"
sha2 = "0.10.8"
sha1 = "0.10.6"
md-5 = "0.10.6"
url = "2.4.0"
walkdir = "2.4.0"
clap = { version = "4.4.0", default-features = false }
[dependencies.wu-manber]
git = "https://github.com/tvlfyi/wu-manber.git"
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
hex-literal = "0.4.1"
lazy_static = "1.4.0"
mimalloc = "0.1.43"
nix = { version = "0.27.1", features = [ "fs" ] }
pretty_assertions = "1.4.0"
rstest = "0.19.0"
tempfile = "3.8.1"
tokio-test = "0.4.3"
[features]
default = ["nix_tests"]
# Enables running the Nix language test suite from the original C++
# Nix implementation (at version 2.3) against Tvix.
nix_tests = []
[[bench]]
name = "eval"
harness = false