diff options
author | Florian Klink <flokli@flokli.de> | 2024-01-18T09·24+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-01-18T15·02+0000 |
commit | 4497ac41ab63a24499e796ff5f50ff79970c5727 (patch) | |
tree | 5bb952ff9b34b561d089a675e73ab0e746161262 /tvix/default.nix | |
parent | 93afc711f65784ed258834613937ca5177201a82 (diff) |
refactor(tools): move crate2nix generate here r/7413
Having something running the depot crate2nix and formatting it with depotfmt is useful outside of tvix too. Change-Id: Iecc8f207da38cc6995747c5ea48d3911433fd416 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10658 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/default.nix')
-rw-r--r-- | tvix/default.nix | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tvix/default.nix b/tvix/default.nix index dc1d4015b10d..9080a85a2dc0 100644 --- a/tvix/default.nix +++ b/tvix/default.nix @@ -88,13 +88,6 @@ let # The cleaned sources. src = depot.third_party.gitignoreSource ./.; - # Run crate2nix generate in the current working directory, then - # format the generated file with depotfmt. - crate2nix-generate = pkgs.writeShellScriptBin "crate2nix-generate" '' - ${pkgs.crate2nix}/bin/crate2nix generate --all-features - ${depot.tools.depotfmt}/bin/depotfmt Cargo.nix - ''; - # Target containing *all* tvix proto files. # Useful for workspace-wide cargo invocations (doc, clippy) protos = pkgs.symlinkJoin { @@ -108,7 +101,7 @@ let in { - inherit crates crate2nix-generate protos; + inherit crates protos; # Run crate2nix generate, ensure the output doesn't differ afterwards # (and doesn't fail). @@ -145,7 +138,7 @@ in # running this command counteracts depotfmt brokenness git init - ${crate2nix-generate}/bin/crate2nix-generate + ${depot.tools.crate2nix-generate}/bin/crate2nix-generate # technically unnecessary, but provides more-helpful output in case of error diff -ur Cargo.nix ${src}/Cargo.nix |