Hercules CI is configured "by convention" using
.nix files in your repository.
Follow these steps to ensure a correct setup.
Clone your repository
Choose which Nix file to use for CI
For simple projects that only need to build for a single architecture and a single set of dependencies.
- or create a
For projects that need to build for multiple architectures or versions, or where
default.nixalready has a special meaning that conflicts with the need for CI.
Use pinned dependencies instead of
Hercules CI uses an empty
NIX_PATHto help with evaluation reprodicibility.
The unofficial NixOS wiki has a basic method of pinning Nixpkgs.
You can use an impure evaluation-time fetcher such as
builtins.fetchUrl, although this typically makes your evaluation unreproducible.
Optionally, test locally with
The behavior of
nix-instantiateserves as a reference for evaluation in Hercules CI. You may use the following command to test locally:
NIX_PATH="" nix-instantiate nix/ci.nix
This may produce a lot of output if you are using import from derivation. You may run it twice for clarity.
Commit and push
Check the attributes via the GitHub commit status or the dashboard. If necessary, see