Nix support for the Unison programming language
NOTE: If you don't already have Nix installed, follow the instructions on the Nix site.
If your version of Nix supports Nix flakes:
nix profile install github:ceedubs/unison-nix#ucm-bin
Use 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.gz
If your version of Nix supports Nix flakes:
nix run github:ceedubs/unison-nix#ucm-bin
Older versions of Nix:
nix-build https://github.com/ceedubs/unison-nix/archive/trunk.tar.gz -A unison-ucm
This will create a symlink named result in your current directory. Now run:
./result/bin/ucm
Once you are done trying out Unison you can rm ./result.
ucm-bin: a binary release of the Unison code manager
unison-ucm in the overlay and for older versions of Nix (pre-flakes)ucm: a release of the Unison code manager built from source (without some of the niceties provided by ucm-bin)vim-unison: a vim plugin providing syntax highlighting for Unison files
vimPlugins.vim-unison in the overlayoverlay: A nixpkgs overlay that adds the Unison packages in the relevant places (ex: vim-unison in vimPlugins.vim-unison)buildShareProject a function for turning functions in a Unison Share project into executable derivations.
buildFromTranscript a lower-level function for turning a Unison transcript into an executable derivation.
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
The nixpkgs repository 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
100.0%
Nix support for the Unison programming language
NOTE: If you don't already have Nix installed, follow the instructions on the Nix site.
If your version of Nix supports Nix flakes:
nix profile install github:ceedubs/unison-nix#ucm-bin
Use 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.gz
If your version of Nix supports Nix flakes:
nix run github:ceedubs/unison-nix#ucm-bin
Older versions of Nix:
nix-build https://github.com/ceedubs/unison-nix/archive/trunk.tar.gz -A unison-ucm
This will create a symlink named result in your current directory. Now run:
./result/bin/ucm
Once you are done trying out Unison you can rm ./result.
ucm-bin: a binary release of the Unison code manager
unison-ucm in the overlay and for older versions of Nix (pre-flakes)ucm: a release of the Unison code manager built from source (without some of the niceties provided by ucm-bin)vim-unison: a vim plugin providing syntax highlighting for Unison files
vimPlugins.vim-unison in the overlayoverlay: A nixpkgs overlay that adds the Unison packages in the relevant places (ex: vim-unison in vimPlugins.vim-unison)buildShareProject a function for turning functions in a Unison Share project into executable derivations.
buildFromTranscript a lower-level function for turning a Unison transcript into an executable derivation.
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
The nixpkgs repository 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
100.0%