Skip to content

Commit e7beb2f

Browse files
committed
Extract the pinned tool versions from flake.nix
And reference them in the development docs, so contributors can more easily discover what versions we use.
1 parent df36526 commit e7beb2f

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

development.markdown

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ __General:__ `./scripts/test.sh` compiles and builds the Haskell code and runs a
44

55
_Disclaimer_ If you have trouble getting started, please get in touch via [Discord](https://unison-lang.org/discord) so we can help. If you have any fixes to the process, please send us a PR!
66

7+
## Development Dependencies
8+
9+
If you are having trouble with a build, please ensure that your tooling matches the versions we expect. Some build mechanisms will guarantee this to some extent (e.g., the Nix build, or [the Haskell extension for VS Code](https://marketplace.visualstudio.com/items?itemName=haskell.haskell)), but you can see versions listed in [our version file](./nix/versions.nix) (some of which is inherited from [this repo’s VS Code settings](./.vscode/settings.json)).
10+
711
## Running Unison
812

913
To get cracking with Unison:

flake.nix

+1-10
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,7 @@
2626
"aarch64-darwin"
2727
]
2828
(system: let
29-
## It’s much easier to read from a JSON file than to have JSON import from some other file, so we extract some
30-
## configuration from the VS Code settings to avoid duplication.
31-
vscodeSettings = nixpkgs-release.lib.importJSON ./.vscode/settings.json;
32-
versions =
33-
vscodeSettings."haskell.toolchain"
34-
## There are some things we want to pin that the VS Code Haskell extension doesn’t let us control.
35-
// {
36-
hpack = "0.35.2";
37-
ormolu = "0.7.2.0";
38-
};
29+
versions = import ./nix/versions.nix {inherit (nixpkgs-haskellNix) lib;};
3930
pkgs = import nixpkgs-haskellNix {
4031
inherit system;
4132
inherit (haskellNix) config;

nix/versions.nix

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{lib}: let
2+
## It’s much easier to read from a JSON file than to have JSON import from some other file, so we extract some
3+
## configuration from the VS Code settings to avoid duplication.
4+
vscodeSettings = lib.importJSON ../.vscode/settings.json;
5+
in
6+
vscodeSettings."haskell.toolchain"
7+
## There are some things we want to pin that the VS Code Haskell extension doesn’t let us control.
8+
// {
9+
hpack = "0.35.2";
10+
ormolu = "0.7.2.0";
11+
}

0 commit comments

Comments
 (0)