Add nix derivation
So I left some comments and things in there, I'm not super proficient at nix or anything and I was hoping you would maybe iterate with me on how you'd prefer things to be set up.
Currently there is a
default.nix, which can build and install verifpal, and a
nix/ directory which contains dependencies as well as a
shell.nix which you can enter (do
nix-shell in the
nix/ directory) to get all the tools needed for updating the dependencies.
I just realized that I should probably use
niv throughout or not at all (it's very convenient but also not the canonical way of doing things so opinions vary).
Just for some idea what the tradeoffs are:
niv is kind of high maintenance since it pins everything which means you need to manually update the "pins" but that also means the build is
completely reproducible very reliable. Currently I am not pinning
nixpkgs and I am subscribing to both the
stable channel and the
unstable channel of
nixpkgs because you need
go 1.13 to build verifpal and
stable is still on
If you'd like to remove
niv then that would basically mean we'd remove the
nix folder, put
deps.nix in the main directory and you'd just have to have the
vgo2nix tool installed locally for updating
If you'd like to go all in on
niv then that would mean I would import
nixpkgs from the
niv sources instead of from the channels.
Do you have any preferences or comments?
(you should be able to do a
git clone and then
nix-build to build or
nix-env -if . to install it into your environment)