about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix')
-rw-r--r--tvix/derivation/src/derivation.rs10
-rw-r--r--tvix/derivation/src/validate.rs4
-rw-r--r--tvix/derivation/src/write.rs2
3 files changed, 3 insertions, 13 deletions
diff --git a/tvix/derivation/src/derivation.rs b/tvix/derivation/src/derivation.rs
index d8870386e25f..f2d88e301fff 100644
--- a/tvix/derivation/src/derivation.rs
+++ b/tvix/derivation/src/derivation.rs
@@ -64,15 +64,7 @@ fn build_store_path(
     };
     let compressed = compress_hash(&digest, 20);
     if is_derivation {
-        StorePath::from_string(
-            format!(
-                "{}-{}{}",
-                NIXBASE32.encode(&compressed),
-                name,
-                write::DOT_FILE_EXT,
-            )
-            .as_str(),
-        )
+        StorePath::from_string(format!("{}-{}.drv", NIXBASE32.encode(&compressed), name).as_str())
     } else {
         StorePath::from_string(format!("{}-{}", NIXBASE32.encode(&compressed), name,).as_str())
     }
diff --git a/tvix/derivation/src/validate.rs b/tvix/derivation/src/validate.rs
index 8a8c1b506911..09b9eea415e5 100644
--- a/tvix/derivation/src/validate.rs
+++ b/tvix/derivation/src/validate.rs
@@ -1,4 +1,4 @@
-use crate::{derivation::Derivation, write::DOT_FILE_EXT, DerivationError};
+use crate::{derivation::Derivation, DerivationError};
 use tvix_store::store_path::StorePath;
 
 impl Derivation {
@@ -60,7 +60,7 @@ impl Derivation {
                 ));
             }
 
-            if !input_derivation_path.ends_with(DOT_FILE_EXT) {
+            if !input_derivation_path.ends_with(".drv") {
                 return Err(DerivationError::InvalidInputDerivationPrefix(
                     input_derivation_path.to_string(),
                 ));
diff --git a/tvix/derivation/src/write.rs b/tvix/derivation/src/write.rs
index 0f53281567cb..fd8800abd82c 100644
--- a/tvix/derivation/src/write.rs
+++ b/tvix/derivation/src/write.rs
@@ -16,8 +16,6 @@ pub const BRACKET_CLOSE: char = ']';
 pub const COMMA: char = ',';
 pub const QUOTE: char = '"';
 
-pub const DOT_FILE_EXT: &str = ".drv";
-
 fn write_array_elements(
     writer: &mut impl Write,
     quote: bool,