This repository hosts a Nix flake for the Internet Computer (IC) toolchain, focusing on providing a reproducible development environment with dfx
, the command-line tool for developing, deploying, and managing Internet Computer projects.
To utilize the development environment managed by this project's Nix flake, you have a couple of options depending on whether you want the environment globally available or project-specific.
For a global installation that makes dfx
and other dependencies accessible system-wide, use:
nix profile install github:wscoble/ic-tools
This command integrates the tools directly into your Nix user profile.
- Reproducible Environment: Leverages Nix flakes to ensure a consistent development environment across all machines.
- Automated Updates: Includes GitHub Actions workflows to automatically update
dfx
versions and dependencies. - Multi-Architecture Support: Offers initial support for x86_64 Linux and macOS, with efforts made to accommodate Apple Silicon (M1/M2) through Rosetta 2.
To use this flake in your Nix environment, ensure you have Nix with flake support installed. If you're new to Nix, follow the official Nix installation guide.
To integrate the IC tools flake into your project, you can add it as an input to your project's flake.nix
:
{
inputs.ic-tools-flake.url = "github:wscoble/ic-tools";
outputs = { self, nixpkgs, ic-tools-flake, ... }: {
// Your flake outputs
};
}
To enter a development shell with dfx
and other tools available:
nix develop github:wscoble/ic-tools
Contributions to the IC Tools Flake are welcome. Whether it's feature requests, bug reports, or code contributions, please feel free to make a pull request or open an issue.
Please use the GitHub Issues page to report any bugs or feature requests.
- Fork the repository.
- Create a new branch for your changes.
- Make your changes and test them.
- Submit a pull request with a comprehensive description of the changes.
This project uses several GitHub Actions workflows to automate maintenance tasks:
- PR Checks: Runs on pull requests to ensure changes don't break the build or
dfx
executable. - Update DFX Version and Hashes: Periodically checks for new
dfx
releases and updates the flake accordingly. - Create Release: Automatically creates a new release when changes are merged into the main branch, including a link to the
dfx
source release.
While efforts are made to support Apple Silicon through Rosetta 2, direct testing and support for aarch64-darwin
is limited by the current capabilities of GitHub Actions and the availability of native tools.
This project is licensed under the Apache License.
- Thanks to the Internet Computer and DFINITY for providing the tools and inspiration for this project.
- This project is not officially affiliated with or endorsed by DFINITY.