-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to correctly resolve mill
dependencies in develop shells?
#83
Comments
We are now making efforts to make the mill dependencies resolve process much reproducible(see https://github.com/Avimitin/mill-ivy-fetcher and chipsalliance/t1#969), please wait until the workflow migrated to chisel-nix. This issue should be fixed after this workflow integrated into chisel-nix project. Currently I suggest checkout to revision 6a8222a. CC @unlsycn. |
As a workaround you can automatically link the .ivy2 directory in devShell: diff --git a/templates/chisel/flake.nix b/templates/chisel/flake.nix
index fe19ac7..4091a61 100644
--- a/templates/chisel/flake.nix
+++ b/templates/chisel/flake.nix
@@ -28,6 +28,8 @@
legacyPackages = pkgs;
devShells.default = mkShell ({
inputsFrom = [ gcd.gcd-compiled gcd.tb-dpi-lib ];
+ nativeBuildInputs = [ pkgs.xorg.lndir ];
+ shellHook = "lndir ${mill-dependencies.chisel}/.ivy2 ~/.ivy2";
packages = [ cargo rustfmt rust-analyzer nixd nvfetcher ];
RUST_SRC_PATH =
"${rust.packages.stable.rustPlatform.rustLibSrc}";
|
Apply recommended workaround described in chipsalliance/chisel-nix#83 before an official fix is implemented.
Apply recommended workaround described in chipsalliance/chisel-nix#83 before an official fix is implemented.
Background
I am trying to get familiar with chisel-nix, and utilize it to spin up my next project. I have created a project with the chisel-nix template with its content left unmodified.
Problem
The template GCD code is building correctly. However, when I start a develop shell with
nix develop ".#gcd.gcd-compiled"
,mill
can't find the pulled Chisel dependency. Are there any points in initialization that I am missing?Project creation:
mkdir test-chisel-nix cd test-chisel-nix git init nix flake init -t github:chipsalliance/chisel-nix#chisel
Building:
Develop shell: (Not working)
Extra information
If I softlink
~/.ivy2
to a Nix artifact store (in this case,ln -d -s /nix/store/pw42h0wlzmdh5lw70zn3xvfwvjgghcji-chisel-mill-local-ivy/.ivy2/ ./.ivy2
), thenmill
works fine, but this solution is neither elegant nor robust.I have also tried to use
nix-direnv
to setup a VSCode remote environment, but it seems to suffer from the same problem. My current.envrc
is as follows:I am rather new to Nix, so feel free to point out if my question is silly or wrong. Any suggestions is welcome. Many thanks in advance. 😉
The text was updated successfully, but these errors were encountered: