Skip to content

Commit

Permalink
Merge pull request #5228 from sellout/pin-vscode-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
aryairani authored Jul 16, 2024
2 parents 7019595 + c3405c2 commit 4538189
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"haskell.toolchain": {
"cabal": "3.10.3.0",
"hls": "2.8.0.0",
"stack": "2.15.7"
}
}
12 changes: 8 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@
"aarch64-darwin"
]
(system: let
versions = {
ormolu = "0.7.2.0";
hls = "2.8.0.0";
stack = "2.15.7";
## It’s much easier to read from a JSON file than to have JSON import from some other file, so we extract some
## configuration from the VS Code settings to avoid duplication.
vscodeSettings = nixpkgs-release.lib.importJSON ./.vscode/settings.json;
versions =
vscodeSettings."haskell.toolchain"
## There are some things we want to pin that the VS Code Haskell extension doesn’t let us control.
// {
hpack = "0.35.2";
ormolu = "0.7.2.0";
};
pkgs = import nixpkgs-haskellNix {
inherit system;
Expand Down
2 changes: 1 addition & 1 deletion nix/haskell-nix-flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
tools =
(args.tools or {})
// {
cabal = {};
cabal = {version = versions.cabal;};
ormolu = {version = versions.ormolu;};
haskell-language-server = {
version = versions.hls;
Expand Down

0 comments on commit 4538189

Please sign in to comment.