Skip to content

libjade and nix

Tiago edited this page Apr 18, 2024 · 3 revisions

Building libjade using nix

Libjade can be build using nix build. This will build the library and provide it in a newly generated result directory.

Development shell

Nix can also be used to enter a development shell. In this all dependencies that are needed to work on libjade are available. To enter the development shell run nix develop.

Updating dependencies in nix

Libjade uses nix in the CI to manage dependencies. The main dependencies are the Jasmin Compiler, EasyCrypt and some SAT solvers.

Which versions of the dependencies are used is specified in inputs of the flake.nix. For easycrypt and jasmin the dependencies are directly fetched from the respective git repositories. All other dependencies are fetched from the official nix package repository.

For easycrypt and jasmin the version to use is specified in the revision hash of the input url. To update these dependencies, replace this revision hash with the one of the new version.

The other dependencies are taken from a release branch of nixpkgs. To update these dependencies replace the release branch with the current one. The current release branch can be found at https://github.com/NixOS/nixpkgs. A new release branch should be released every 6 months.

After updating any dependencies run nix flake lock to update the flake.lock file.

Clone this wiki locally