about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix')
-rw-r--r--tvix/glue/src/fetchers/mod.rs4
-rw-r--r--tvix/glue/src/lib.rs3
2 files changed, 4 insertions, 3 deletions
diff --git a/tvix/glue/src/fetchers/mod.rs b/tvix/glue/src/fetchers/mod.rs
index 035e9f11a8a7..7050ad48f51a 100644
--- a/tvix/glue/src/fetchers/mod.rs
+++ b/tvix/glue/src/fetchers/mod.rs
@@ -178,8 +178,6 @@ pub struct Fetcher<BS, DS, PS, NS> {
     nar_calculation_service: NS,
 }
 
-const USER_AGENT: &str = concat!("Tvix/", env!("CARGO_PKG_VERSION"));
-
 impl<BS, DS, PS, NS> Fetcher<BS, DS, PS, NS> {
     pub fn new(
         blob_service: BS,
@@ -189,7 +187,7 @@ impl<BS, DS, PS, NS> Fetcher<BS, DS, PS, NS> {
     ) -> Self {
         Self {
             http_client: reqwest::Client::builder()
-                .user_agent(USER_AGENT)
+                .user_agent(crate::USER_AGENT)
                 .build()
                 .expect("Client::new()"),
             blob_service,
diff --git a/tvix/glue/src/lib.rs b/tvix/glue/src/lib.rs
index 320d1f6fede2..8f72424d59cc 100644
--- a/tvix/glue/src/lib.rs
+++ b/tvix/glue/src/lib.rs
@@ -7,6 +7,9 @@ pub mod tvix_store_io;
 
 mod fetchurl;
 
+// Used as user agent in various HTTP Clients
+const USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"));
+
 #[cfg(test)]
 mod tests;