about summary refs log tree commit diff
path: root/tvix/nix-compat/src/store_path/mod.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-10 r/6262 feat(tvix/nix-compat): derive HashFlorian Klink1-1/+1
This allows using a StorePath as a key in a hashmap. Change-Id: Id3eed623da4e1fc44a970a3982c7caa21d2495c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8666 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-05-16 r/6145 feat(tvix/nix-compat): add StorePath::from_absolute_path_fullFlorian Klink1-2/+75
This allows decomposing a path consisting of a store path AND a suffix into a StorePath, and a PathBuf containing the rest. Change-Id: I81290e2fd804cdc9d1e88c71cb22c0fb882d7936 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8567 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-05-16 r/6144 docs(tvix/nix-compat): update docstringsFlorian Klink1-10/+18
Make it cleaner that StorePath only does encode the first path component after the STORE_DIR prefix. Also, move some of the comments around a bit, so it makes more sense what's using what. Change-Id: Ibb57373a13526e30c58ad561ca50e1336b091d94 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8566 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-05-14 r/6139 refactor(tvix/nix-compat): update expect_err stringsFlorian Klink1-4/+4
Make it more explicit that we expect the from_string calls to fail here. Change-Id: Ib3d46fc0850e364125e3548670ef301eeea2e45c Reviewed-on: https://cl.tvl.fyi/c/depot/+/8565 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-04-09 r/6088 refactor(nix-compat): Properly encapsulate store path constructionJohn Ericson1-10/+20
Before there was code scattered about (e.g. text hashing module and derivation output computation) constructing store paths from low level building blocks --- there was some duplication and it was easy to make nonsense store paths. Now, we have roughly the same "safe-ish" ways of constructing them as C++ Nix, and only those are exposed: - Make text hashed content-addressed store paths - Make other content-addressed store paths - Make input-addressed fixed output hashes Change-Id: I122a3ee0802b4f45ae386306b95b698991be89c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8411 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-03-30 r/6060 refactor(tvix/nix-compat): move build_store_path out of derivationFlorian Klink1-0/+203
This doesn't have anything to do with ATerms, we just happen to be using the aterm representation of a Derivation as contents. Moving this into store_path/utils.rs makes these things much cleaner - Have a build_store_path_from_references function, and a build_store_path_from_fingerprint helper function that makes use of it. build_store_path_from_references is invoked from the derivation module which can be used to calculate the derivation path. In the derivation module, we also invoke build_store_path_from_fingerprint during the output path calculation. Change-Id: Ia8d61a5e8e5d3f396f93593676ed3f5d1a3f1d66 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8367 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI