Unofficial build of common binaries used by developers of the Internet Computer blockchain.
x86_64
and aarch64
).Usage
Depending on your objective, you can do any the following:
nix-build -A <project>
nix-shell -A <project>.shell
nix-shell https://github.com/ninegua/ic-nix/releases/latest/download/dfx-env.tar.gz
All you need is a working nix installation on your computer.
Compile-yourself from source
For those who prefer to compile from source:
nix-shell https://github.com/ninegua/ic-nix/releases/latest/download/dfx-env.tar.gz --arg force true
You can use pre-compiled derivations by setting a binary cache (courtesy of cachix) nix-shell -p cachix --run 'cachix use ninegua'
.
VSCode/direnv
Assuming you're developing on ic
.
direnv
installed.ic
.ic/rs
: run echo "use nix ../../ic-nix/default.nix -A ic.shell" > .envrc
. direnv allow .
If using VSCode, you should also install the direnv vscode extension, to make sure that rust-analyzer will be using the same versions of Rust as your shell.
WARNING
Releases are built against the latest main branches of each project at the time. They may not always work. Please understand the risks before proceed.
Supported projects
Supported platforms and nixpkgs:
24.05 | unstable | |
---|---|---|
darwin x86_64 | ❌ | ❌ |
linux x86_64 | ✅︎ | ✅︎ |
darwin aarch64 | ✅︎ | ✅︎ |
Only the outdated nixpkgs 23.05 supports darwin x86_64
, and it does not provide the required empscripten version to compile motoko.
Feature:
Note that this effort requires no nix support of a project unless it already has.