kadena-io / kda-tool

CLI interface to the the Kadena blockchain
https://kadena.io/
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

Migrate the Nix setup to flakes + haskell.nix #28

Closed enobayram closed 1 year ago

enobayram commented 1 year ago

This PR replaces the haskell4nix-based Nix setup with a Nix flakes + haskell.nix-based setup and adds a github action for building and caching it. It also replaces the existing default.nix and shell.nix files and turns them into a wrapper for the flake.nix so that nix-build and nix-shell keeps working as before. This allows us to deduplicate the Nix definitions and also allows these legacy commands to take advantage of the binary cache populated by the flake.

One useful feature of the old haskell4nix-based setup that we're losing with this transition is the ability to "inline" our dependencies in the dep folder using nix-thunk and work on them through that local checkout. Fortunately, it's still possible to work with local copies of the dependencies with a little more work: