diff options
author | Florian Klink <flokli@flokli.de> | 2024-04-22T17·05+0300 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-04-23T12·41+0000 |
commit | 8181817e53f4c0da5d7dfa1a56e296fefd929bcb (patch) | |
tree | 9fe6ede59171f79d37ff954deb2bc8cfff9cc8ba /tvix/glue/Cargo.toml | |
parent | dfef3d18d177bbeadcc3000cc39ef0a16a566a1f (diff) |
feat(tvix/glue/fetchers): support file:// URLs r/7996
Nix supports file:// - URLs for `fetchurl` and `fetchTarball`. Convert the enums and function arguments to hold a URL type. reqwest::Url is a re-export of the url crate, but they don't re-export the parsing errors, and as we want to hold these in our Error types, add it to Cargo.toml explicitly. The Fetcher::download function now checks on the scheme, and either opens the file locally, or does do a HTTP request as before. Fetch gets its custom debug impl, removing potentially sensitive username and password out of URLs. Change-Id: I777db1fe487370e822cbfec4624034aca5e08045 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11504 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/glue/Cargo.toml')
-rw-r--r-- | tvix/glue/Cargo.toml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/glue/Cargo.toml b/tvix/glue/Cargo.toml index f28011767419..f929d720a0e7 100644 --- a/tvix/glue/Cargo.toml +++ b/tvix/glue/Cargo.toml @@ -27,6 +27,7 @@ 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" [dependencies.async-compression] |