Skip to content

Commit 7a717b5

Browse files
authored
Quick start guide on project setup via Nix
1 parent 9066771 commit 7a717b5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,23 @@ with the latest SSProve development readily installed.
7070
- [SSProve versioned](.nix/flake.nix.template_versioned) -- provides
7171
a Nix flake that loads a dedicated version (that you may change).
7272

73+
#### Quick start guide
74+
75+
##### Nix installation
76+
This is performed only once.
77+
1. [Install Nix](https://nix.dev/install-nix.html) with `curl -L https://nixos.org/nix/install | sh -s -- --daemon`
78+
2. Enable [flake support](https://nixos.wiki/wiki/Flakes) with `mkdir -p ~/.config/nix && echo -e "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf`
79+
All set.
80+
81+
##### Project setup
82+
1. Create a new project folder and `cd` into it.
83+
2. Copy one of the above templates into it (removing the `.template*` suffix).
84+
3. And finally run `nix develop` which throws you into a shell where SSProve is already installed. (`From Crypt Require Import ...`)
85+
86+
You may need to initialize the project as a Git repository and add the `flake.nix` to it.
87+
The generated `flake.lock` pins the versions and hence also needs to be added to this new project repo.
88+
89+
In the `flake.nix`, you can add [more Coq packages from the Nix repository](https://github.com/NixOS/nixpkgs/blob/a194f9d0654e368fb900830a19396f9d7792647a/pkgs/top-level/coq-packages.nix#L20).
7390

7491
## Build instructions
7592

0 commit comments

Comments
 (0)