Skip to content

nix flake update & bump ghc 921 -> 922 (nix only) #2853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d5d936f
Get rid of cabal-ghc90.project
pepeiborra Mar 6, 2022
c2313ed
fix trailing comma
pepeiborra Mar 6, 2022
8c8fa89
hie-compat does not need ghc-lib on GHC 9.x
pepeiborra Mar 6, 2022
0115629
Drop -haddock as ghc 8.10.7 fails to build ghc-lib with:
pepeiborra Apr 29, 2022
afcd63a
Add ghc-lib flag for hls-hlint-plugin
pepeiborra Apr 29, 2022
b8a8dbd
remove unnecessary allow-newer entries
pepeiborra Apr 29, 2022
a9a0299
flake.lock: Update
smunix Apr 25, 2022
f6f92dc
nix flake update & bump ghc921 -> ghc922
smunix Apr 25, 2022
25df34a
myst-parser: bump docutils version requirements
smunix Apr 25, 2022
0316b29
fix devShells and packages default
smunix Apr 26, 2022
483e223
use ghc-exactprint 1.5.0 for ghc922
smunix Apr 30, 2022
0671a86
ghc902: add flag hlint34 to nix
smunix Apr 30, 2022
58258bf
macosx: add SSE-enabled ptr-poker dependency
smunix Apr 30, 2022
a74875d
ghc902 requires ghc-lib-parser >= 9.2
smunix Apr 30, 2022
9b8176d
nix: ghcDefault supports HLS tweaks
smunix Apr 30, 2022
2862ebb
ghc902 requires Cabal-36 to build Ormolu
smunix Apr 30, 2022
5553277
flag ghc-lib for hls-hlint-plugin on ghc902
smunix Apr 30, 2022
dd18468
fix typo
smunix Apr 30, 2022
b868dd5
add support for pre-commit in mkDevShell
smunix Apr 30, 2022
8e2aed2
fix typo
smunix Apr 30, 2022
f018e24
add ptr-poker to nix shell
smunix Apr 30, 2022
573bb66
add ghc-884 configuration tweaks
smunix Apr 30, 2022
f1a519e
fix stylish-haskell for ghc-884
smunix Apr 30, 2022
3e2fbfb
fix default ghc lookup
smunix Apr 30, 2022
b024b1d
ghc884: fixup brittany version to 0.13.1.2
smunix Apr 30, 2022
89cdb05
ghc884: fixup aeson version to 1.5.2.0
smunix Apr 30, 2022
f2a936a
ghc884: fixup ormolu/fourmolu
smunix Apr 30, 2022
b0545b0
add configuration tweak for ghc8107
smunix Apr 30, 2022
9d24aec
rename configuration-ghc-xxx.nix files
smunix Apr 30, 2022
b610547
update hackage index
smunix Apr 30, 2022
9beb832
use current cabal/hackage to fetch ptr-poker in mkDevShell
smunix Apr 30, 2022
ca5e49b
reinstate .pre-commit.yaml
smunix May 1, 2022
12b10eb
fix hls-922-dev-nix ghc version
smunix May 1, 2022
6c5e009
nix: temporary disable "build binaries" from the work flow
smunix May 1, 2022
d0b26fa
nix: temporary disable builds and partially populate cachix
smunix May 2, 2022
a041124
nix: temporarily disable ghc 884 and 8107
smunix May 2, 2022
0869af2
nix: temporarily disable nix develop run
smunix May 2, 2022
e276dca
nix: re-enable ghc8107/ghc884 builds, disable "build all binaries"
smunix May 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ jobs:
run: cachix push haskell-language-server dev
- name: Build binaries
run: nix build --print-build-logs
- name: Build all binaries
run: nix build --print-build-logs .#all-haskell-language-server
# smunix: "Build all binaries" takes too long to run and doesn't contribute
# to caching to cachix for now; so I'm disabling it for now.
# - name: Build all binaries
# run: nix build --print-build-logs .#all-haskell-language-server
- name: Push binaries
if: ${{ env.HAS_TOKEN == 'true' }}
run: nix path-info --json | jq -r '.[].path' | cachix push haskell-language-server
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test/testdata/**/hie.yaml
.shake/

# pre-commit-hook.nix
#.pre-commit-config.yaml
.pre-commit-config.yaml

# direnv
/.direnv/
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variables:
- GHC_VERSION: 8.10.7
CABAL_PROJECT: cabal.project
- GHC_VERSION: 9.0.2
CABAL_PROJECT: cabal-ghc90.project
CABAL_PROJECT: cabal.project
- GHC_VERSION: 9.2.2
CABAL_PROJECT: cabal-ghc92.project
- GHC_VERSION: 9.2.1
Expand Down
2 changes: 1 addition & 1 deletion bindist/ghcs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
8.6.5,cabal.project
8.8.4,cabal.project
8.10.7,cabal.project
9.0.2,cabal-ghc90.project
9.0.2,cabal.project
9.2.1,cabal-ghc92.project
9.2.2,cabal-ghc92.project
2 changes: 1 addition & 1 deletion bindist/ghcs-FreeBSD
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
8.10.7,cabal.project
9.0.2,cabal-ghc90.project
9.0.2,cabal.project
2 changes: 1 addition & 1 deletion bindist/ghcs-Msys
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
8.10.7,cabal.project
9.0.2,cabal-ghc90.project
9.0.2,cabal.project
9.2.2,cabal-ghc92.project
9.2.1,cabal-ghc92.project
58 changes: 0 additions & 58 deletions cabal-ghc90.project

This file was deleted.

2 changes: 1 addition & 1 deletion cabal-ghc92.project
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ package *

write-ghc-environment-files: never

index-state: 2022-04-27T09:22:49Z
index-state: 2022-04-30T21:02:45Z

constraints:
-- These plugins don't build/work on GHC92 yet
Expand Down
16 changes: 5 additions & 11 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,15 @@ optional-packages: vendored/*/*.cabal
tests: true

package *
-- ghc 8.10 cannot build ghc-lib 9.2 with --haddock
-- ghc-options: -haddock
-- ghc 8.10.7 fails to build ghc-lib-9.2.2
-- ghc-options: --haddock
test-show-details: direct

write-ghc-environment-files: never

index-state: 2022-04-27T09:22:49Z
index-state: 2022-04-30T21:02:45Z

constraints:
hyphenation +embed,
-- remove this when hlint sets ghc-lib to true by default
-- https://github.com/ndmitchell/hlint/issues/1376
hlint +ghc-lib
hyphenation +embed,
hls-hlint-plugin +ghc-lib,

allow-newer:
-- for shake-bench
Chart-diagrams:diagrams-core,
SVGFonts:diagrams-core
58 changes: 58 additions & 0 deletions configuration-ghc-810.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{ pkgs, inputs }:

let
disabledPlugins = [
"hls-brittany-plugin"
"hls-hlint-plugin"
"hls-stylish-haskell-plugin"
"hls-haddock-comments-plugin"
"hls-tactics-plugin"
# That one is not technically a plugin, but by putting it in this list, we
# get it removed from the top level list of requirement and it is not pull
# in the nix shell.
"shake-bench"
];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib; {
hlsDisabledPlugins = disabledPlugins;

ghc-lib = hself.ghc-lib_8_10_7_20220219;
ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219;

fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-0300 { };

stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell"
inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { };

aeson = hself.callCabal2nixWithOptions "aeson" inputs.aeson-1520
(pkgs.lib.concatStringsSep " " [ ]) { };

brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312
(pkgs.lib.concatStringsSep " " [ ]) { };

hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin"
./plugins/hls-hlint-plugin
(pkgs.lib.concatStringsSep " " [ "-f-hlint34" "-fhyphenation" ]) { };

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [
"-fpedantic"
"-f-hlint"
"-f-fourmolu"
"-f-ormolu"
]) { };

# YOLO
mkDerivation = args:
hsuper.mkDerivation (args // {
jailbreak = true;
doCheck = false;
});
};
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}
58 changes: 58 additions & 0 deletions configuration-ghc-88.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{ pkgs, inputs }:

let
disabledPlugins = [
"hls-brittany-plugin"
"hls-hlint-plugin"
"hls-stylish-haskell-plugin"
"hls-haddock-comments-plugin"
"hls-tactics-plugin"
# That one is not technically a plugin, but by putting it in this list, we
# get it removed from the top level list of requirement and it is not pull
# in the nix shell.
"shake-bench"
];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib; {
hlsDisabledPlugins = disabledPlugins;

ghc-lib = hself.ghc-lib_8_10_7_20220219;
ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219;

fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-0300 { };

stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell"
inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { };

aeson = hself.callCabal2nixWithOptions "aeson" inputs.aeson-1520
(pkgs.lib.concatStringsSep " " [ ]) { };

brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312
(pkgs.lib.concatStringsSep " " [ ]) { };

hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin"
./plugins/hls-hlint-plugin
(pkgs.lib.concatStringsSep " " [ "-f-hlint34" "-fhyphenation" ]) { };

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [
"-fpedantic"
"-f-hlint"
"-f-fourmolu"
"-f-ormolu"
]) { };

# YOLO
mkDerivation = args:
hsuper.mkDerivation (args // {
jailbreak = true;
doCheck = false;
});
};
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}
45 changes: 45 additions & 0 deletions configuration-ghc-90.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{ pkgs, inputs }:

let
disabledPlugins = [ "hls-brittany-plugin" "hls-stylish-haskell-plugin" ];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib; {
hlsDisabledPlugins = disabledPlugins;

# ptr-poker breaks on MacOS without SSE2 optimizations
# https://github.com/nikita-volkov/ptr-poker/issues/11
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };

ghc-lib = hself.ghc-lib_9_2_2_20220307;
ghc-lib-parser = hself.ghc-lib-parser_9_2_2_20220307;
ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_3;

Cabal = hself.Cabal_3_6_3_0;
ormolu = hself.ormolu_0_4_0_0;
fourmolu = hself.fourmolu_0_6_0_0;

# Hlint is still broken
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint-34 { });

hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin"
./plugins/hls-hlint-plugin
(pkgs.lib.concatStringsSep " " [ "-fhlint34" "-fghc-lib" ]) { };

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [ "-f-brittany" "-f-stylishhaskell" ])
{ };

# YOLO
mkDerivation = args:
hsuper.mkDerivation (args // {
jailbreak = true;
doCheck = false;
});
};
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}
36 changes: 0 additions & 36 deletions configuration-ghc-901.nix

This file was deleted.

22 changes: 12 additions & 10 deletions configuration-ghc-921.nix → configuration-ghc-92.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# nix version of cabal-ghc901.project
{ pkgs, inputs }:

let
Expand All @@ -14,19 +13,22 @@ let
];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
{
with pkgs.haskell.lib; {
hlsDisabledPlugins = disabledPlugins;

fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {};
primitive-extras = hself.primitive-extras_0_10_1_2;
ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint {};
constraints-extras = hself.callCabal2nix "constraints-extras" inputs.constraints-extras {};
retrie = hself.callCabal2nix "retrie" inputs.retrie {};
fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu { };
ghc-exactprint =
hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { };
constraints-extras =
hself.callCabal2nix "constraints-extras" inputs.constraints-extras { };
retrie = hself.callCabal2nix "retrie" inputs.retrie { };

# ptr-poker breaks on MacOS without SSE2 optimizations
# https://github.com/nikita-volkov/ptr-poker/issues/11
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };

# Hlint is still broken
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint {});
hiedb = hself.hiedb_0_4_1_0;
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { });

# Re-generate HLS drv excluding some plugins
haskell-language-server =
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx==4.0.2
sphinx-rtd-theme==0.5.2
myst-parser==0.15.1
docutils<0.17
docutils<0.19
Loading