2022-12-08 22:19:22 +01:00
|
|
|
[package]
|
|
|
|
name = "tvix-cli"
|
|
|
|
version = "0.1.0"
|
|
|
|
edition = "2021"
|
|
|
|
|
2022-12-12 19:40:29 +01:00
|
|
|
[[bin]]
|
|
|
|
name = "tvix"
|
|
|
|
path = "src/main.rs"
|
|
|
|
|
2022-12-08 22:19:22 +01:00
|
|
|
[dependencies]
|
|
|
|
tvix-eval = { path = "../eval" }
|
2023-01-16 11:27:33 +01:00
|
|
|
tvix-derivation = { path = "../derivation" }
|
2022-12-08 22:19:22 +01:00
|
|
|
rustyline = "10.0.0"
|
2022-12-16 12:54:22 +01:00
|
|
|
clap = { version = "4.0", features = ["derive", "env"] }
|
fix(tvix/cli): handle SRI hashes in outputHash
Instead of being called with `md5`, `sha1`, `sha256` or `sha512`,
`fetchurl.nix` (from corepkgs / `<nix`) can also be called with a `hash`
attribute, being an SRI hash.
In that case, `builtin.derivation` is called with `outputHashAlgo` being
an empty string, and `outputHash` being an SRI hash string.
In other cases, an SRI hash is passed as outputHash, but outputHashAlgo
is set too.
Nix does modify these values in (single, fixed) output specification it
serializes to ATerm, but keeps it unharmed in `env`.
Move this into a construct_output_hash helper function, that can be
tested better in isolation.
Change-Id: Id9d716a119664c44ea7747540399966752e20187
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7933
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2023-01-26 14:18:12 +01:00
|
|
|
tvix-store-bin = { path = "../store" }
|
2022-12-08 22:19:22 +01:00
|
|
|
dirs = "4.0.0"
|
2022-12-13 18:17:00 +01:00
|
|
|
smol_str = "0.1"
|
2023-01-11 16:14:08 +01:00
|
|
|
aho-corasick = "0.7"
|
fix(tvix/cli): handle SRI hashes in outputHash
Instead of being called with `md5`, `sha1`, `sha256` or `sha512`,
`fetchurl.nix` (from corepkgs / `<nix`) can also be called with a `hash`
attribute, being an SRI hash.
In that case, `builtin.derivation` is called with `outputHashAlgo` being
an empty string, and `outputHash` being an SRI hash string.
In other cases, an SRI hash is passed as outputHash, but outputHashAlgo
is set too.
Nix does modify these values in (single, fixed) output specification it
serializes to ATerm, but keeps it unharmed in `env`.
Move this into a construct_output_hash helper function, that can be
tested better in isolation.
Change-Id: Id9d716a119664c44ea7747540399966752e20187
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7933
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2023-01-26 14:18:12 +01:00
|
|
|
ssri = "7.0.0"
|
|
|
|
data-encoding = "2.3.3"
|
2023-01-26 23:42:10 +01:00
|
|
|
thiserror = "1.0.38"
|
fix(tvix/cli): handle SRI hashes in outputHash
Instead of being called with `md5`, `sha1`, `sha256` or `sha512`,
`fetchurl.nix` (from corepkgs / `<nix`) can also be called with a `hash`
attribute, being an SRI hash.
In that case, `builtin.derivation` is called with `outputHashAlgo` being
an empty string, and `outputHash` being an SRI hash string.
In other cases, an SRI hash is passed as outputHash, but outputHashAlgo
is set too.
Nix does modify these values in (single, fixed) output specification it
serializes to ATerm, but keeps it unharmed in `env`.
Move this into a construct_output_hash helper function, that can be
tested better in isolation.
Change-Id: Id9d716a119664c44ea7747540399966752e20187
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7933
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2023-01-26 14:18:12 +01:00
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
test-case = "2.2.2"
|