about summary refs log tree commit diff
path: root/tvix/nix-compat
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-10-15T23·41+0300
committerclbot <clbot@tvl.fyi>2024-10-17T18·16+0000
commita94414e7ffc5c21874fa0ea6e92aa63fcc55cb7d (patch)
tree6e7f31f92fa5cbf78bfeaa75d411ce50e9d1fbe6 /tvix/nix-compat
parent1277b0c08891e8fd82c4a504193f43f635a7be18 (diff)
refactor(nix-compat/store_path): drop build_nar_based_store_path r/8822
This is the only (remaining) occurence of it, and not really
more code than just calling store_path::build_ca_path with
`CAHash::Nar(NixHash::Sha256(…))`, especially considering we need the
CAHash in the PathInfo struct later anyways - so let's remove this
function.

Change-Id: Ia82212086062c366e0280ca0823d9e68a3f91d3a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12632
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat')
-rw-r--r--tvix/nix-compat/src/store_path/utils.rs14
1 files changed, 0 insertions, 14 deletions
diff --git a/tvix/nix-compat/src/store_path/utils.rs b/tvix/nix-compat/src/store_path/utils.rs
index 543a2e7e8e6f..a0dc21160e7a 100644
--- a/tvix/nix-compat/src/store_path/utils.rs
+++ b/tvix/nix-compat/src/store_path/utils.rs
@@ -119,20 +119,6 @@ where
         .map_err(BuildStorePathError::InvalidStorePath)
 }
 
-/// For given NAR sha256 digest and name, return the new [StorePath] this would
-/// have, or an error, in case the name is invalid.
-pub fn build_nar_based_store_path<'a, SP>(
-    nar_sha256_digest: &[u8; 32],
-    name: &'a str,
-) -> Result<StorePath<SP>, BuildStorePathError>
-where
-    SP: std::cmp::Eq + std::ops::Deref<Target = str> + std::convert::From<&'a str>,
-{
-    let nar_hash_with_mode = CAHash::Nar(NixHash::Sha256(nar_sha256_digest.to_owned()));
-
-    build_ca_path(name, &nar_hash_with_mode, Vec::<String>::new(), false)
-}
-
 /// This builds an input-addressed store path.
 ///
 /// Input-addresed store paths are always derivation outputs, the "input" in question is the