1.9 KiB
1.9 KiB
Nix expressions for building LIGO
Nix is a declarative package manager. Get it here: https://nixos.org/nix
These expressions are used on CI to reproducibly build the LIGO compiler, as well as WebIDE and https://ligolang.org .
If you wish to build it yourself with nix build -f. $thing
, where $thing
is
ligo
: executables, libraries, documentation, coverage reportsligo-bin
: a dynamically linked binary (Linux, Mac)ligo-static
: a statically linked binary (Linux only)ligo-doc
: documentation generated by odocligo-editor
: WebIDE, it can be started withresult/bin/ligo-editor
ligo-website
: the website, website root isresult
ligo-docker
: a docker image with LIGO binariesligo-editor-docker
: a docker image with webideligo-deb
: debian package with static binaries
Quick maintenance guide
opam-repository
andtezos-opam-repository
are pinned. To update them when required, runniv update
(you can get niv withnix shell nixpkgs#niv
)ocaml
version is pinned inocaml-overlay.nix
. If you want to update it, go there and change the version.- If something fails,
nix repl pkgs.nix
can be very useful to investigate it.
Known caveats
- This is not a nix flake. This will never be a flake if we want to keep this low-maintenance, because of the way
opam
sources are defined. Sometimes, the checksum is omitted there, so we have to usefetchTarball
without the checksum, which won't work in restricted mode (which is required for flakes). The only solution would be to generate nix expressions for opam-repository separately, but it means a manual step in the process (and it's also impossible to make this work as a flake). - For the same reason as above, evaluation can take a while because we need to download all the sources every
tarball-ttl
seconds. This can be mitigated by settingtarball-ttl
to a high value.