From 400a31a15c1d0c9299cbdd40bb6fbf11e7aa4f8b Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Sun, 7 Jan 2024 18:43:44 +0530 Subject: [PATCH 1/3] Update nixpkgs for newer HLS version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps nixpkgs input to newer to get the newer version of HLS • Updated input 'nixpkgs': 'github:nixos/nixpkgs/0c7ffbc66e6d78c50c38e717ec91a2a14e0622fb' (2023-10-02) → 'github:nixos/nixpkgs/63143ac2c9186be6d9da6035fa22620018c85932' (2024-01-02) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index d6e379b..15ac39b 100644 --- a/flake.lock +++ b/flake.lock @@ -495,11 +495,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1696261572, - "narHash": "sha256-s8TtSYJ1LBpuITXjbPLUPyxzAKw35LhETcajJjCS5f0=", + "lastModified": 1704161960, + "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0c7ffbc66e6d78c50c38e717ec91a2a14e0622fb", + "rev": "63143ac2c9186be6d9da6035fa22620018c85932", "type": "github" }, "original": { From 0bd4cfcdcf9c9b23689d4b507db94b2b8425e8f2 Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Tue, 9 Jan 2024 13:12:55 +0530 Subject: [PATCH 2/3] Move to GHC 9.2.8 package-set Moves to using GHC 9.2.8 as the base package-set, updating from the earlier GHC 9.2.7 package set. GHC 9.2.8 is the compiler version that's best supported by HLS in the 9.2 series, looking at it's support table. This would bring the best-case scenario for HLS for us, as much as we can hope on 9.2 series. --- README.md | 5 +++++ flake-module.nix | 2 +- flake.nix | 2 +- nix/{ghc927.nix => ghc928.nix} | 8 ++++---- nix/haskell/default.nix | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) rename nix/{ghc927.nix => ghc928.nix} (87%) diff --git a/README.md b/README.md index e49adb2..9d28de1 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,11 @@ Nix-based project configuration shared between nammayatri repositories - Automatic importing of the common flakeModule. - The common flakeModule provides: - treefmt-based autoformatters: ormolu, hlint, dhall-format, nixpkgs-fmt + - Common Haskell configuration + - ~~GHC 8.10 package set (matching LTS 16.31 in part)~~ (DEPRECATED, file and references kept for posterity only) + - GHC 9.2.8 package set + - Avoid global tool caches (`no-global-cache.nix`) + - Common `package.yaml` (hpack) configuration - `mission-control` - `process-compose-flake` - pre-commit hooks diff --git a/flake-module.nix b/flake-module.nix index 513bc56..4eddaf5 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -9,7 +9,7 @@ common: (import ./nix/treefmt.nix common) ./nix/haskell # ./nix/ghc810.nix - ./nix/ghc927.nix + ./nix/ghc928.nix ./nix/pre-commit.nix ./nix/arion.nix common.inputs.cachix-push.flakeModule diff --git a/flake.nix b/flake.nix index c4c229f..bad7a24 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,7 @@ flakeModules = { default = import ./flake-module.nix { inherit inputs; }; # ghc810 = ./nix/ghc810.nix; - ghc927 = ./nix/ghc927.nix; + ghc928 = ./nix/ghc928.nix; }; lib.mkFlake = args: mod: diff --git a/nix/ghc927.nix b/nix/ghc928.nix similarity index 87% rename from nix/ghc927.nix rename to nix/ghc928.nix index 7d56fef..bacecb3 100644 --- a/nix/ghc927.nix +++ b/nix/ghc928.nix @@ -1,11 +1,11 @@ # To use this package set in your `haskell-flake` projects, set the # `basePackages` option as follows: # -# > basePackages = config.haskellProjects.ghc927.outputs.finalPackages; +# > basePackages = config.haskellProjects.ghc928.outputs.finalPackages; # { perSystem = { pkgs, lib, config, ... }: { - haskellProjects.ghc927 = { + haskellProjects.ghc928 = { projectFlakeName = "nammayatri:common"; # This is not a local project, so disable those options. @@ -13,7 +13,7 @@ devShell.enable = false; autoWire = [ ]; - # Uses GHC-9.2.7 package set as base + # Uses GHC-9.2.8 package set as base # We use a versioned package-set instead of the more # general `pkgs.haskellPackages` set in order to be @@ -21,7 +21,7 @@ # specific GHC version and by extension the related # packages versions that come with this snapshot - basePackages = pkgs.haskell.packages.ghc927; + basePackages = pkgs.haskell.packages.ghc928; packages = { # Dependencies from Hackage diff --git a/nix/haskell/default.nix b/nix/haskell/default.nix index 6796292..3d8690f 100644 --- a/nix/haskell/default.nix +++ b/nix/haskell/default.nix @@ -5,7 +5,7 @@ ./no-global-cache.nix ./devtools.nix ]; - basePackages = config.haskellProjects.ghc927.outputs.finalPackages; + basePackages = config.haskellProjects.ghc928.outputs.finalPackages; defaults.settings.default = { name, package, config, ... }: lib.optionalAttrs (package.local.toDefinedProject or false) { # Disabling haddock and profiling is mainly to speed up Nix builds. From 6785ebd98f1db33ffd44f4d2076de75454e1aef5 Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Mon, 29 Jan 2024 16:15:52 +0530 Subject: [PATCH 3/3] Add "persistent" package source override Pins "persistent" package to version "2.14.5.2". The version "2.14.6.0" in the nixpkgs has issues building with the main nammayatri repo. --- nix/ghc928.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/ghc928.nix b/nix/ghc928.nix index bacecb3..b6285d6 100644 --- a/nix/ghc928.nix +++ b/nix/ghc928.nix @@ -25,7 +25,7 @@ packages = { # Dependencies from Hackage - + persistent.source = "2.14.5.2"; }; settings = {