Skip to content
/ ic-nix Public
forked from ninegua/ic-nix

Build Internet Computer projects with Nix

License

Notifications You must be signed in to change notification settings

anchpop/ic-nix

 
 

Repository files navigation

Build Internet Computer Projects with Nix

ci release

Usage

  • To build a project, run nix-build -A <project>.
  • To enter a development environment for a project, run nix-shell -A <project>.shell.
  • To download the latest pre-built binaries, go to release page.
  • To start canister development with latest build, run:
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.

For aarch64 (Apple M1) architecture, you have a couple choices:

  1. Compile everything from source by passing extra argument --arg force true.
  2. Use x86_64 binaries by passing extra argument --argstr system x86_64.
  3. Use pre-built aarch64 binaries by getting it from the 20220527 release. These were built offline and manually uploaded.

Before you compile from source, you may also want to setup the binary cache (courtesy of cachix) by nix-shell -p cachix --run 'cachix use ninegua' to avoid unnecessary compilation.

WARNING

Releases are built against the latest main branches of each project on a weekly update schedule. They may not always work. Please understand the risks before proceed.

Supported projects

Supported platforms:

  • Linux x86-64
  • Linux aarch-64 (*)
  • OS X x86-64 (*)
  • OS X aarch-64 (*)

(*) Build succeeds, but running some of the tests could fail.

Supported nixpkgs:

  • 21.11
  • 22.05
  • unstable

Feature:

  • Build native binaries with nix-build with glibc.
  • Dynamic binaries with minimal dependencies: glibc on Linux, system libs on OS X.
  • Build Wasm binaries with nix-build.
  • Develop with nix-shell.
  • Build release binaries on Github.
  • Build and run all tests.

Note that this effort requires no nix support of a project unless it already has.

About

Build Internet Computer projects with Nix

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Nix 96.6%
  • Makefile 3.4%