about summary refs log tree commit diff
path: root/tvix/nix-compat (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-02-01 r/5809 feat(tvix/nix-compat/derivation): Display -> to_aterm_string()Florian Klink2-11/+19
Instead of implementing `std::fmt::Display for Derivation` and relying on the `to_string` method, introduce a `to_aterm_string()` method, which does the same thing, but makes it clearer what we're producing, rather than just calling `to_string()``. Change-Id: I21823de9096a0f2c2eb6f4591e48c1aa9fd94161 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7998 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-02-01 r/5806 feat(tvix/nix-compat): add nixhash moduleFlorian Klink2-0/+359
This module takes care of parsing various hashes and algorithms. It will get used to modify derivation output hashes in the next CL. Change-Id: Idc07c401dbb7510f49883ac02b8379b9a5d930c7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7990 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-02-01 r/5805 refactor(tvix/nix-compat/derivation): remove module inceptionFlorian Klink3-350/+356
The module `src/derivation/derivation.rs` is a sign of module inception. Move the Derivation struct definiton up into `src/derivation/mod.rs`, and some of the helpers in a `util.rs`. Change-Id: Ib24a5f8a27bdd45df8b1fa2b3482a79b33cab8d5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7997 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-02-01 r/5804 refactor(tvix/nix-compat): operator precedence can trip the unwaryFlorian Klink1-1/+1
warning: operator precedence can trip the unwary --> nix-compat/src/nixbase32.rs:41:23 | 41 | c |= ((input[i + 1] as u16) << 8 - j as u16) as u8 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(input[i + 1] as u16) << (8 - j as u16)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence = note: `#[warn(clippy::precedence)]` on by default Change-Id: I091071d649abf4ed38f5f4e39a0c5d21a0459bff Reviewed-on: https://cl.tvl.fyi/c/depot/+/7996 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-02-01 r/5803 refactor(tvix/derivation): don't create deref'd immediately refFlorian Klink2-3/+3
clippy says: > This expression creates a reference which is immediately dereferenced > by the compiler Change-Id: Ic2c093b043ebee9ae80912075083107e4d216cf1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7995 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su>
2023-02-01 r/5802 refactor(tvix/nix-compat): remove unneeded returnFlorian Klink1-2/+2
Change-Id: I97b9fb3ad33d2f51baf29486d4eff11f8dedcbab Reviewed-on: https://cl.tvl.fyi/c/depot/+/7994 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de>
2023-02-01 r/5801 refactor(tvix/nix-compat): const is always 'staticFlorian Klink1-1/+1
Change-Id: If33bbf47a6cc376f2c0935ea4331a819223b2f00 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7993 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su>
2023-02-01 r/5799 feat(tvix/cli): implement builtins.placeholderVincent Ambo1-0/+18
This doesn't require any other corresponding handling *yet*, as the actual replacements happen in the builder logic (which we delegate to cppnix at the moment). Change-Id: I034147c933f05ae427c7a8794647132d108d0ede Reviewed-on: https://cl.tvl.fyi/c/depot/+/7972 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-01-31 r/5796 docs(tvix/nix-compat/store_path): fix docstringsFlorian Klink1-2/+2
Change-Id: I19261233e338b406a87fe680675eb4dfd853fe11 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7970 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de>
2023-01-31 r/5793 refactor(tvix/nix-compat): absorb nar writerFlorian Klink4-0/+254
Expose it at `nix_compat::nar::writer`. Change-Id: I98a8acfa6277074f24608d64fb6c0082b41d10f5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7969 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-01-31 r/5792 docs(tvix/nix-compat/derivation): fix docstringsFlorian Klink2-2/+5
Change-Id: I3fd02e62c8a24fa7f27461b17cdd824b060d9bdb Reviewed-on: https://cl.tvl.fyi/c/depot/+/7968 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de>
2023-01-31 r/5791 refactor(tvix/nix-compat): absorb //tvix/derivationFlorian Klink26-0/+1330
Put this in its src/derivation. Change-Id: Ic047ab1c2da555a833ee454e10ef60c77537b617 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7967 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-01-31 r/5788 refactor(tvix): introduce nix-compat crateFlorian Klink5-0/+388
Move nixbase32 and store_path into this. This allows //tvix/cli to not pull in //tvix/store for now. Change-Id: Id3a32867205d95794bc0d33b21d4cb3d9bafd02a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7964 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>