Building a Nix Project
What This Guide Covers
Travis CI support for Nix is contributed by the community and may be removed or altered at any time. If you run into any problems, please report them in the Travis CI issue tracker and cc @domenkozar @garbas and @matthewbauer .
To install the Nix store and set up a basic single-user profile, set the
language key in
The default channel for
nixpkgs will be
The following command line tools are available in the Nix environment:
Default Nix Version
Currently, only version “1.11.2” of Nix is provided. In the future, it may be possible to configure different versions with
The default build script is
nix-build which builds everything in the
default.nix file of the repository root. This can be overridden by setting the
script key in the
.travis.yml file. For example,
language: nix script: nix-build -A tarball release.nix
The above configuration will attempt to build the attribute “tarball” from the Nix expression in release.nix.
More information on writing Nix expressions and how each of the above tools works is available in the Nix manual.