Skip to content

Commit 384902c

Browse files
lf-jneiraberberman
authored
Update nix flake (#2159)
* Update nix flake Doing a nixpkgs update gains ghc 8.10.6 support. lsp-types needed updating to satisfy bounds so I did that. * Add ghc-lib-parser override required for ormolu * Put the override in the right spot, oopsie * Pass --print-build-logs to nix commands * Fix tracy on darwin * Remove the macOS hack since it got merged * It appears this is actually ghc8107 by now Co-authored-by: Javier Neira <[email protected]> Co-authored-by: Potato Hatsue <[email protected]>
1 parent 1daecd4 commit 384902c

File tree

4 files changed

+23
-35
lines changed

4 files changed

+23
-35
lines changed

Diff for: .github/workflows/nix.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ jobs:
5757
skipPush: true
5858
- if: ${{ needs.pre_job.outputs.should_skip_develop != 'true' }}
5959
run: |
60-
nix develop --command cabal update
61-
nix develop --command cabal build
60+
nix develop --print-build-logs --command cabal update
61+
nix develop --print-build-logs --command cabal build
6262
6363
# Build and then push HLS binaries with developmet shell to cachix
6464
# This job runs when
@@ -91,16 +91,16 @@ jobs:
9191
name: haskell-language-server
9292
authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }}
9393
- name: Build development shell
94-
run: nix develop --profile dev
94+
run: nix develop --print-build-logs --profile dev
9595
- name: Build development shell (GHC 9.0.1)
96-
run: nix develop .#haskell-language-server-901-dev --profile dev
96+
run: nix develop --print-build-logs .#haskell-language-server-901-dev --profile dev
9797
- name: Push development shell
9898
if: ${{ env.HAS_TOKEN == 'true' }}
9999
run: cachix push haskell-language-server dev
100100
- name: Build binaries
101-
run: nix build
101+
run: nix build --print-build-logs
102102
- name: Build binaries (GHC 9.0.1)
103-
run: nix build .#haskell-language-server-901
103+
run: nix build --print-build-logs .#haskell-language-server-901
104104
- name: Push binaries
105105
if: ${{ env.HAS_TOKEN == 'true' }}
106106
run: nix path-info --json | jq -r '.[].path' | cachix push haskell-language-server

Diff for: configuration-ghc-901.nix

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ let
6969

7070
ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_0_0_4;
7171

72+
ormolu = hself.ormolu_0_2_0_0;
73+
7274
operational = hself.callCabal2nix "operational" (pkgs.fetchFromGitHub {
7375
owner = "HeinrichApfelmus";
7476
repo = "operational";

Diff for: flake.lock

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: flake.nix

+6-20
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,11 @@
7979
sha256 = "byehvdxQxhNk5ZQUXeFHjAZpAze4Ct9261ro4c5acZk=";
8080
}) { };
8181

82-
lsp = hself.callCabal2nix "lsp"
83-
(builtins.fetchTarball {
84-
url = "https://hackage.haskell.org/package/lsp-1.2.0.1/lsp-1.2.0.1.tar.gz";
85-
sha256 = "1lhzsraiw11ldxvxn8ax11hswpyzsvw2da2qmp3p6fc9rfpz4pj5";
86-
}) { };
82+
lsp = hself.lsp_1_2_0_1;
8783

88-
lsp-types = hself.callCabal2nix "lsp-types"
89-
(builtins.fetchTarball {
90-
url = "https://hackage.haskell.org/package/lsp-types-1.3.0.0/lsp-types-1.3.0.0.tar.gz";
91-
sha256 = "0qajyyj2d51daa4y0pqaa87n4nny0i920ivvzfnrk9gq9386iac7";
92-
}) { };
84+
lsp-types = hself.lsp-types_1_3_0_1;
9385

94-
lsp-test = hself.callCabal2nix "lsp-test"
95-
(builtins.fetchTarball {
96-
url = "https://hackage.haskell.org/package/lsp-test-0.14.0.1/lsp-test-0.14.0.1.tar.gz";
97-
sha256 = "10lnyg7nlbd3ymgvjjlrkfndyy7ay9cwnsk684p08k2gzlric4yq";
98-
}) { };
86+
lsp-test = hself.lsp-test_0_14_0_1;
9987
};
10088

10189
hlsSources =
@@ -177,7 +165,7 @@
177165
+ pkgs.lib.replaceStrings [ "." ] [ "" ]
178166
pkgs.haskellPackages.ghc.version);
179167
ghc884 = pkgs.hlsHpkgs "ghc884";
180-
ghc8104 = pkgs.hlsHpkgs "ghc8104";
168+
ghc8107 = pkgs.hlsHpkgs "ghc8107";
181169
ghc901 = ghc901Config.tweakHpkgs (pkgs.hlsHpkgs "ghc901");
182170

183171
# For markdown support
@@ -252,15 +240,13 @@
252240
# dev shell
253241
haskell-language-server-dev = mkDevShell ghcDefault;
254242
haskell-language-server-884-dev = mkDevShell ghc884;
255-
haskell-language-server-8104-dev = mkDevShell ghc8104;
256-
haskell-language-server-8105-dev = builtins.throw "GHC 8.10.5 is not available in nixpkgs";
243+
haskell-language-server-8107-dev = mkDevShell ghc8107;
257244
haskell-language-server-901-dev = mkDevShell ghc901;
258245

259246
# hls package
260247
haskell-language-server = mkExe ghcDefault;
261248
haskell-language-server-884 = mkExe ghc884;
262-
haskell-language-server-8104 = mkExe ghc8104;
263-
haskell-language-server-8105 = builtins.throw "GHC 8.10.5 is not available in nixpkgs";
249+
haskell-language-server-8107 = mkExe ghc8107;
264250
haskell-language-server-901 = mkExe ghc901;
265251

266252
# docs

0 commit comments

Comments
 (0)