xtask-specific binaries in GRAPEVINE_XTASK_PATH

Some possible alternatives to this:

 - Keep putting them in PATH.
 - Make xtask a nix derivation. We would lose out on incremental
   compilation this way, and would end up recompiling xtask from scratch
   whenever something in the main package changed.
 - Have xtask call `nix build --inputs-from $toplevel nixpkgs#go` and
   such. Slow and tedious.
This commit is contained in:
Benjamin Lee 2024-06-21 17:08:10 -07:00
parent 102430cc79
commit f76806655f
No known key found for this signature in database
GPG key ID: FB9624E2885D55A4
4 changed files with 63 additions and 18 deletions

View file

@ -6,6 +6,7 @@
, go
, inputs
, jq
, lib
, lychee
, markdownlint-cli
, mdbook
@ -19,6 +20,13 @@ mkShell {
# sources, and it can read this environment variable to do so. The
# `rust-src` component is required in order for this to work.
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
# See the doc comment on `use_xtask_path` in `xtask/src/main.rs`.
GRAPEVINE_XTASK_PATH = lib.makeBinPath [
# Keep sorted
complement
go
];
};
# Development tools
@ -36,10 +44,6 @@ mkShell {
markdownlint-cli
mdbook
toolchain
# TODO: don't pollute the devshell with these
go
complement
]
++
default.nativeBuildInputs