ceedubs/unison-nix-snake
Example of building a Unison program via Nix
{ "createdAt": "2024-01-18T04:12:02Z", "defaultBranch": "main", "description": "Example of building a Unison program via Nix", "fullName": "ceedubs/unison-nix-snake", "homepage": null, "language": "Nix", "name": "unison-nix-snake", "pushedAt": "2025-05-21T00:46:40Z", "stargazersCount": 11, "topics": [], "updatedAt": "2025-07-25T14:33:13Z", "url": "https://github.com/ceedubs/unison-nix-snake"}Unison Nix Snake
Section titled “Unison Nix Snake”This repository demonstrates using unison-nix to easily package an app written in Unison.
Running the app
Section titled “Running the app”nix run github:ceedubs/unison-nix-snakeIf you are on an ARM-based Mac (M1, etc) you may need to run the following (since Unison doesn’t yet release ARM builds):
nix run --system x86_64-darwin github:ceedubs/unison-nix-snakeThe first time that you run this, it will take a while to pull the project from Share. But Nix will cache the result and subsequent runs should be nearly instantaneous.
Packaging your own Unison app with Nix
Section titled “Packaging your own Unison app with Nix”Copy [flake.nix]!(flake.nix) and change the fields passed to buildUnisonShareProject as needed.
To start, set compiledHash = pkgs.lib.fakeHash. When you do a nix run, Nix will complain about the compiled hash not matching and will tell you the actual hash that you should use instead.