about summary refs log tree commit diff
path: root/tvix/nix-compat/src
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-31T12·27-0400
committerJohn Ericson <git@johnericson.me>2023-03-31T18·46+0000
commitb932cf2d85af64a383f8020394301889f5df04c5 (patch)
tree2e392ee1927363ed7728b275829b058da7eb319e /tvix/nix-compat/src
parentdf78a4d24ee88289d979c2068ddf59d949c41004 (diff)
refactor(nix-compat) Make `nixhash_*` mods hierarchical r/6068
They can go under `nixhash`

Change-Id: Ia15835c57130b66d58f5df80ae9595dceee00941
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8408
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src')
-rw-r--r--tvix/nix-compat/src/lib.rs2
-rw-r--r--tvix/nix-compat/src/nixhash/algos.rs (renamed from tvix/nix-compat/src/nixhash_algos.rs)0
-rw-r--r--tvix/nix-compat/src/nixhash/mod.rs (renamed from tvix/nix-compat/src/nixhash.rs)7
-rw-r--r--tvix/nix-compat/src/nixhash/with_mode.rs (renamed from tvix/nix-compat/src/nixhash_with_mode.rs)0
4 files changed, 5 insertions, 4 deletions
diff --git a/tvix/nix-compat/src/lib.rs b/tvix/nix-compat/src/lib.rs
index 4cfd708e52d8..37d79f38fb37 100644
--- a/tvix/nix-compat/src/lib.rs
+++ b/tvix/nix-compat/src/lib.rs
@@ -2,6 +2,4 @@ pub mod derivation;
 pub mod nar;
 pub mod nixbase32;
 pub mod nixhash;
-mod nixhash_algos;
-mod nixhash_with_mode;
 pub mod store_path;
diff --git a/tvix/nix-compat/src/nixhash_algos.rs b/tvix/nix-compat/src/nixhash/algos.rs
index 1864b4ef975f..1864b4ef975f 100644
--- a/tvix/nix-compat/src/nixhash_algos.rs
+++ b/tvix/nix-compat/src/nixhash/algos.rs
diff --git a/tvix/nix-compat/src/nixhash.rs b/tvix/nix-compat/src/nixhash/mod.rs
index 0c7637c60a5e..dccba7a5ba27 100644
--- a/tvix/nix-compat/src/nixhash.rs
+++ b/tvix/nix-compat/src/nixhash/mod.rs
@@ -2,8 +2,11 @@ use crate::nixbase32;
 use data_encoding::{BASE64, BASE64_NOPAD, HEXLOWER};
 use thiserror::Error;
 
-pub use crate::nixhash_algos::HashAlgo;
-pub use crate::nixhash_with_mode::NixHashWithMode;
+mod algos;
+mod with_mode;
+
+pub use algos::HashAlgo;
+pub use with_mode::NixHashWithMode;
 
 /// Nix allows specifying hashes in various encodings, and magically just
 /// derives the encoding.
diff --git a/tvix/nix-compat/src/nixhash_with_mode.rs b/tvix/nix-compat/src/nixhash/with_mode.rs
index e895f0c62704..e895f0c62704 100644
--- a/tvix/nix-compat/src/nixhash_with_mode.rs
+++ b/tvix/nix-compat/src/nixhash/with_mode.rs