Skip to content

Commit 4538189

Browse files
authored
Merge pull request #5228 from sellout/pin-vscode-versions
2 parents 7019595 + c3405c2 commit 4538189

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"haskell.toolchain": {
3+
"cabal": "3.10.3.0",
4+
"hls": "2.8.0.0",
5+
"stack": "2.15.7"
6+
}
7+
}

flake.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@
2626
"aarch64-darwin"
2727
]
2828
(system: let
29-
versions = {
30-
ormolu = "0.7.2.0";
31-
hls = "2.8.0.0";
32-
stack = "2.15.7";
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+
// {
3336
hpack = "0.35.2";
37+
ormolu = "0.7.2.0";
3438
};
3539
pkgs = import nixpkgs-haskellNix {
3640
inherit system;

nix/haskell-nix-flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
tools =
2929
(args.tools or {})
3030
// {
31-
cabal = {};
31+
cabal = {version = versions.cabal;};
3232
ormolu = {version = versions.ormolu;};
3333
haskell-language-server = {
3434
version = versions.hls;

0 commit comments

Comments
 (0)