Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nix flake #235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

thederekkaplan
Copy link

Currently, the Prusti repo has a Nix flake, but this flake does not work because it downloads Viper from the download link. This means that whenever a new version of Viper is released and the SHA256 hash changes, the Prusti flake will fail to build. By introducing a flake in the Viper repository as well, the Prusti flake will be able to refer to a specific version of Viper, and a new release of Viper will not break the Prusti flake.

Notes:

  • Nix does not work well with submodules. In order to copy the submodules to the Nix store, you have to explicity specify the target as "git+file://$(pwd)?submodules=1". For example, instead of nix build ., you would run nix build "git+file://$(pwd)?submodules=1". In the future, if Viper were to switch to using Nix for all development and CI, the submodules could be removed and instead the Carbon, Silicon, and Silver repositories could be used as flake inputs, removing the need for this.
  • nix develop "git+file://$(pwd)?submodules=1" opens a development shell with sbt and JDK 11 in the PATH, and the Z3_EXE and BOOGIE_EXE environment variables are set.
  • Currently, the flake only builds the fat jar, since that is all Prusti needs. An additional package could be added in the future to the flake to build the skinny jars instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant