about summary refs log tree commit diff
path: root/tvix/nix-compat/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/nix-compat/src/lib.rs')
-rw-r--r--tvix/nix-compat/src/lib.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/tvix/nix-compat/src/lib.rs b/tvix/nix-compat/src/lib.rs
index ec9ddd1ffa7b..2aac179bcfce 100644
--- a/tvix/nix-compat/src/lib.rs
+++ b/tvix/nix-compat/src/lib.rs
@@ -1,5 +1,3 @@
-use sha2::{Digest, Sha256};
-
 pub mod derivation;
 pub mod nar;
 pub mod nixbase32;
@@ -8,19 +6,3 @@ mod nixhash_algos;
 mod nixhash_with_mode;
 pub mod store_path;
 mod texthash;
-
-/// Nix placeholders (i.e. values returned by `builtins.placeholder`)
-/// are used to populate outputs with paths that must be
-/// string-replaced with the actual placeholders later, at runtime.
-///
-/// The actual placeholder is basically just a SHA256 hash encoded in
-/// cppnix format.
-pub fn hash_placeholder(name: &str) -> String {
-    let digest = {
-        let mut hasher = Sha256::new();
-        hasher.update(format!("nix-output:{}", name));
-        hasher.finalize()
-    };
-
-    format!("/{}", nixbase32::encode(&digest))
-}