Skip to content
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

dfx? #2

Closed
nomeata opened this issue May 17, 2022 · 4 comments
Closed

dfx? #2

nomeata opened this issue May 17, 2022 · 4 comments

Comments

@nomeata
Copy link

nomeata commented May 17, 2022

There is incomplete support for dfx in https://github.com/nomeata/dfx-in-nix, but your project is probably a better place for this. Opening this issue to track progress (or to have a place for people to read why dfx is not part of ic-nix).

@ninegua
Copy link
Owner

ninegua commented May 19, 2022

Now supported! You can try

nix-shell https://github.com/ninegua/ic-nix/releases/latest/download/dfx-env.tar.gz

This will enter a nix-shell environment with dfx and other tools to start canister development! It will download pre-built binaries if your platform is supported. Otherwise it will give a nice warning saying you can add --arg force true to build from source!

@nomeata
Copy link
Author

nomeata commented May 19, 2022

Very neat! How exactly did you convince dfx to use the replica binary you built and put on the PATH, instead of the one it usually extracts from its embedded cache?

@ninegua
Copy link
Owner

ninegua commented May 19, 2022

dfx actually will find a binary if its path is given in the environment DFX_$name_PATH. See https://github.com/ninegua/ic-nix/blob/main/dfx-env.nix#L74-L77

@nomeata
Copy link
Author

nomeata commented May 19, 2022

Ah, this must be new or I was blind when I tried to nixify dfx.

@nomeata nomeata closed this as completed May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants