From c05760b17fd882758c974fd6d2808bbc03f990ad Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Fri, 8 Jul 2022 10:00:30 +0200 Subject: [PATCH 1/3] build(nix): ghc922 -> ghc923 bumped nixpkgs and add support for ghc923 (replacing ghc922) --- cabal.project | 1 + flake.lock | 48 ++++++++++++++++++++++++------------------------ flake.nix | 18 ++++++++++-------- 3 files changed, 35 insertions(+), 32 deletions(-) diff --git a/cabal.project b/cabal.project index 62dc214f28..f87c79e86a 100644 --- a/cabal.project +++ b/cabal.project @@ -67,4 +67,5 @@ allow-newer: ---------- hiedb:base, + ekg-core, ekg-wai:time diff --git a/flake.lock b/flake.lock index a78b703cd4..de1c8b39ca 100644 --- a/flake.lock +++ b/flake.lock @@ -54,11 +54,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "lastModified": 1656928814, + "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", "type": "github" }, "original": { @@ -69,11 +69,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "lastModified": 1656928814, + "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", "type": "github" }, "original": { @@ -133,11 +133,11 @@ "gitignore": { "flake": false, "locked": { - "lastModified": 1646480205, - "narHash": "sha256-kekOlTlu45vuK2L9nq8iVN17V3sB0WWPqTTW3a2SQG0=", + "lastModified": 1657706534, + "narHash": "sha256-5jIzNHKtDu06mA325K/5CshUVb5r7sSmnRiula6Gr7o=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "bff2832ec341cf30acb3a4d3e2e7f1f7b590116a", + "rev": "f840a659d57e53fa751a9248b17149fd0cf2a221", "type": "github" }, "original": { @@ -249,11 +249,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1650049622, - "narHash": "sha256-fh/xYFctwzuowIWsVdtXUVtil4pxk54GabGY/sNKU30=", - "owner": "nixos", + "lastModified": 1657849727, + "narHash": "sha256-68J4eSwzr98r7VCzgrX/WWaQzkY7gdKqH2uSyQheYj0=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "92d1f76186bb974dd90971d7619f8bf0bff23a73", + "rev": "0b683abff06fe55755ea992ba47f2e787081a30f", "type": "github" }, "original": { @@ -265,11 +265,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1654085299, - "narHash": "sha256-sR1pefD3cvNvYIcGTUXvUMe9UesEkSKtjGN1H/TBXsQ=", + "lastModified": 1657888067, + "narHash": "sha256-GnwJoFBTPfW3+mz7QEeJEEQ9OMHZOiIJ/qDhZxrlKh8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3b4bdfbe6f19ca497d999ad08aeb668839858a18", + "rev": "65fae659e31098ca4ac825a6fef26d890aaf3f4e", "type": "github" }, "original": { @@ -284,11 +284,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1653561148, - "narHash": "sha256-JzAttqACdvMOTwkzkJ0jFF8MWIo8Uau4w/XUMyqpnd8=", + "lastModified": 1657626303, + "narHash": "sha256-O/JJ0hSBCmlx0oP8QGAlRrWn0BvlC5cj7/EZ0CCWHTU=", "owner": "nix-community", "repo": "poetry2nix", - "rev": "3b01c3e3dc57d511848d8433153ab67db79640e1", + "rev": "920ba682377d5c0d87945c5eb6141ab8447ca509", "type": "github" }, "original": { @@ -347,7 +347,7 @@ "ptr-poker": "ptr-poker", "retrie": "retrie", "sphinx_rtd_theme": "sphinx_rtd_theme", - "stylish-haskell-01220": "stylish-haskell-01220" + "stylish-haskell": "stylish-haskell" } }, "sphinx_rtd_theme": { @@ -367,16 +367,16 @@ "type": "github" } }, - "stylish-haskell-01220": { + "stylish-haskell": { "flake": false, "locked": { - "narHash": "sha256-uQIvhz/xRbKLHe9et+tHUVE9To5vt1Pz3+vvDEqJaLI=", + "narHash": "sha256-oZSR5UQ+ieMFRq7MvL0sJqOblMk74awvcepuT+JHYtA=", "type": "tarball", - "url": "https://hackage.haskell.org/package/stylish-haskell-0.12.2.0/stylish-haskell-0.12.2.0.tar.gz" + "url": "https://hackage.haskell.org/package/stylish-haskell-0.14.2.0/stylish-haskell-0.14.2.0.tar.gz" }, "original": { "type": "tarball", - "url": "https://hackage.haskell.org/package/stylish-haskell-0.12.2.0/stylish-haskell-0.12.2.0.tar.gz" + "url": "https://hackage.haskell.org/package/stylish-haskell-0.14.2.0/stylish-haskell-0.14.2.0.tar.gz" } } }, diff --git a/flake.nix b/flake.nix index bcd4e28dba..532ee269ba 100644 --- a/flake.nix +++ b/flake.nix @@ -76,8 +76,8 @@ url = "https://hackage.haskell.org/package/ptr-poker-0.1.2.8/ptr-poker-0.1.2.8.tar.gz"; flake = false; }; - stylish-haskell-01220 = { - url = "https://hackage.haskell.org/package/stylish-haskell-0.12.2.0/stylish-haskell-0.12.2.0.tar.gz"; + stylish-haskell = { + url = "https://hackage.haskell.org/package/stylish-haskell-0.14.2.0/stylish-haskell-0.14.2.0.tar.gz"; flake = false; }; implicit-hie-cradle = { @@ -160,6 +160,8 @@ implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.implicit-hie-cradle {}; + stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib"; + # https://github.com/NixOS/nixpkgs/issues/140774 ormolu = if final.system == "aarch64-darwin" @@ -213,7 +215,7 @@ }; ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; }; - ghc922Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; }; + ghc923Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; }; # GHC versions # While HLS still works fine with 8.10 GHCs, we only support the versions that are cached @@ -222,12 +224,12 @@ ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version); cases = { ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); - ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922"); + ghc923 = ghc923Config.tweakHpkgs (pkgs.hlsHpkgs "ghc923"); }; in { default = cases."${ghcVersion}"; } // cases; ghc902 = supportedGHCs.ghc902; - ghc922 = supportedGHCs.ghc922; + ghc923 = supportedGHCs.ghc923; ghcDefault = supportedGHCs.default; # For markdown support @@ -359,20 +361,20 @@ simpleDevShells = { haskell-language-server-dev = mkDevShell ghcDefault "cabal.project"; haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project"; - haskell-language-server-922-dev = mkDevShell ghc922 "cabal.project"; + haskell-language-server-923-dev = mkDevShell ghc923 "cabal.project"; }; # Developement shell, haskell packages are also provided by nix nixDevShells = { haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project"; haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project"; - haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc922 "cabal.project"; + haskell-language-server-923-dev-nix = mkDevShellWithNixDeps ghc923 "cabal.project"; }; allPackages = { haskell-language-server = mkExe ghcDefault; haskell-language-server-902 = mkExe ghc902; - haskell-language-server-922 = mkExe ghc922; + haskell-language-server-923 = mkExe ghc923; }; devShells = simpleDevShells // nixDevShells // { From bf472917d46c7934fd14b9213240d247d99ad8b0 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 19 Jul 2022 14:56:45 +0200 Subject: [PATCH 2/3] fixes --- configuration-ghc-90.nix | 6 +++--- configuration-ghc-92.nix | 2 ++ flake.nix | 2 -- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configuration-ghc-90.nix b/configuration-ghc-90.nix index 2a19f397aa..6b712a043b 100644 --- a/configuration-ghc-90.nix +++ b/configuration-ghc-90.nix @@ -19,11 +19,11 @@ let 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; + # ghc-lib-parser = hself.ghc-lib-parser_9_2_2_20220307; + ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_4; Cabal = hself.Cabal_3_6_3_0; - ormolu = hself.ormolu_0_4_0_0; + ormolu = hself.ormolu_0_5_0_0; fourmolu = hself.fourmolu_0_6_0_0; # Hlint is still broken diff --git a/configuration-ghc-92.nix b/configuration-ghc-92.nix index 1577a7a2cf..3790e182a7 100644 --- a/configuration-ghc-92.nix +++ b/configuration-ghc-92.nix @@ -29,6 +29,8 @@ let # Hlint is still broken hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { }); + stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib"; + # Re-generate HLS drv excluding some plugins haskell-language-server = hself.callCabal2nixWithOptions "haskell-language-server" ./. diff --git a/flake.nix b/flake.nix index 532ee269ba..c14a40bb49 100644 --- a/flake.nix +++ b/flake.nix @@ -160,8 +160,6 @@ implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.implicit-hie-cradle {}; - stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib"; - # https://github.com/NixOS/nixpkgs/issues/140774 ormolu = if final.system == "aarch64-darwin" From e743443f0b61692173174d60dc654ca2f22dbaf6 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 19 Jul 2022 18:44:21 +0200 Subject: [PATCH 3/3] fixing for ghc90? --- configuration-ghc-90.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configuration-ghc-90.nix b/configuration-ghc-90.nix index 6b712a043b..7c16281847 100644 --- a/configuration-ghc-90.nix +++ b/configuration-ghc-90.nix @@ -19,13 +19,12 @@ let 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 = hself.ghc-lib-parser_9_2_3_20220709; ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_4; Cabal = hself.Cabal_3_6_3_0; ormolu = hself.ormolu_0_5_0_0; fourmolu = hself.fourmolu_0_6_0_0; - # Hlint is still broken hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint-34 { });