ceedubs/unison-nix
{ "createdAt": "2020-10-09T23:05:20Z", "defaultBranch": "trunk", "description": "Nix support for the Unison programming language", "fullName": "ceedubs/unison-nix", "homepage": null, "language": "Nix", "name": "unison-nix", "pushedAt": "2025-11-25T19:06:46Z", "stargazersCount": 64, "topics": [], "updatedAt": "2025-11-26T20:21:04Z", "url": "https://github.com/ceedubs/unison-nix"}unison-nix
Section titled “unison-nix”[Nix] support for the [Unison] programming language
NOTE: If you don’t already have Nix installed, follow the instructions on the Nix site.
install Unison code manager
Section titled “install Unison code manager”If your version of Nix supports [Nix flakes]:
nix profile install github:ceedubs/unison-nix#ucm-binUse from home-manager:
In your home-manager’s flake.nix, reference this repository under inputs, e.g.:
unison-lang = { url = "github:ceedubs/unison-nix"; inputs.nixpkgs.follows = "nixpkgs";};then add the unison-lang overlay:
pkgs = import nixpkgs { inherit system; overlays = [ unison-lang.overlay ];};Finally, in your home.nix, just add the unison-ucm package as you normally would.
An example is available here.
Older versions of Nix:
nix-env -iA unison-ucm -f https://github.com/ceedubs/unison-nix/archive/trunk.tar.gztry out Unison without installing it to your PATH/Nix profile
Section titled “try out Unison without installing it to your PATH/Nix profile”If your version of Nix supports [Nix flakes] !:
nix run github:ceedubs/unison-nix#ucm-binOlder versions of Nix:
nix-build https://github.com/ceedubs/unison-nix/archive/trunk.tar.gz -A unison-ucmThis will create a symlink named result in your current directory. Now run:
./result/bin/ucmOnce you are done trying out Unison you can rm ./result.
available packages/tools
Section titled “available packages/tools”ucm-bin: a binary release of the Unison code manager- This is named
unison-ucmin the overlay and for older versions of Nix (pre-flakes)
- This is named
ucm: a release of the Unison code manager built from source (without some of the niceties provided byucm-bin)vim-unison: a vim plugin providing syntax highlighting for Unison files- This is provided as
vimPlugins.vim-unisonin the overlay
- This is provided as
- VS Code extensions
- unison-lang.unison – the official extension from the Unison team, provides syntax highlighting and LSP support
- TomSherman.unison-ui – adds a codebase explorer sidebar
overlay: A nixpkgs overlay that adds the Unison packages in the relevant places (ex:vim-unisoninvimPlugins.vim-unison)buildUnisonShareProjecta function for turning functions in a Unison Share project into executable derivations.- See unison-nix-snake for an example.
- See [nix/build-share-project.nix]!(nix/build-share-project.nix) for documentation.
buildUnisonFromTranscripta lower-level function for turning a Unison transcript into an executable derivation.- See [nix/build-from-transcript.nix]!(nix/build-from-transcript.nix) for documentation.
In the future this repository would be a natural home for derivations for other Unison tools.
NOTE: the unison github repo repo has a flake.nix that you can use with nix develop to get an environment with the expected versions of stack, ormolu, etc.
Fabricated/Anticipated Questions
Why don’t these derivations live in nixpkgs?
Section titled “Why don’t these derivations live in nixpkgs?”The [nixpkgs repository][nixpkgs] was the original home of Unison Nix dervations, but Unison is evolving quickly and getting Unison updates merged into nixpkgs turned out to be a bottleneck in getting these new features and bug fixes out to Unison users.
[Nix] !: https://nixos.org/ [Nix Flakes] !: https://nixos.wiki/wiki/Flakes [nixpkgs] !: https://github.com/nixos/nixpkgs [Stack] !: https://docs.haskellstack.org/en/stable/README/ [Unison] !: https://www.unisonweb.org/