From 42fac7039d7fecb5bbd0d6968facd888b547039e Mon Sep 17 00:00:00 2001 From: Torsten Schmits Date: Fri, 29 Dec 2023 00:24:38 +0100 Subject: [PATCH] Add ghc98 to the nix config --- flake.lock | 14 +++++++------- flake.nix | 13 ++++++++----- nix/overlay.nix | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index a1d4d7c5..88b85fe8 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -20,17 +20,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1692794812, - "narHash": "sha256-lEVkjqiIyjAkkWwP2IadNzKur3NpBrvK6g8tJk1r458=", + "lastModified": 1703305083, + "narHash": "sha256-8xecxMrq4+18tqTuWU/UqP0hYVvCJiODKkTckVIBAoE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8b5b7def915305c7d4f5cf236c095bf898bc7995", + "rev": "54ce5abce7e1531376455c7b32a195329c2587f0", "type": "github" }, "original": { "owner": "nixos", "repo": "nixpkgs", - "rev": "8b5b7def915305c7d4f5cf236c095bf898bc7995", + "rev": "54ce5abce7e1531376455c7b32a195329c2587f0", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 45c0451a..ebfb0ed5 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Higher-order, low-boilerplate free monads."; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/8b5b7def915305c7d4f5cf236c095bf898bc7995"; + nixpkgs.url = "github:nixos/nixpkgs/54ce5abce7e1531376455c7b32a195329c2587f0"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -18,16 +18,19 @@ "92" = hsPkgs nixpkgs "ghc92"; "94" = hsPkgs nixpkgs "ghc94"; "96" = hsPkgs nixpkgs "ghc96"; + "98" = hsPkgs nixpkgs "ghc98"; }; + default = "96"; + mkPackages = version: { "polysemy-${version}" = ghcs.${version}.polysemy; "polysemy-plugin-${version}" = ghcs.${version}.polysemy-plugin; }; defaultPackages = { - inherit (ghcs."92") polysemy polysemy-plugin; - default = ghcs."92".polysemy; + inherit (ghcs.${default}) polysemy polysemy-plugin; + default = ghcs.${default}.polysemy; }; packages = foldl' (l: r: l // r) defaultPackages (map mkPackages (attrNames ghcs)); @@ -36,7 +39,7 @@ packages = p: [p.polysemy p.polysemy-plugin]; buildInputs = with ghc; [ cabal-install - ] ++ nixpkgs.lib.optionals (name != "96") [ + ] ++ nixpkgs.lib.optionals (name != "98") [ (ghc.pkgs.haskell.lib.dontCheck ghcid) haskell-language-server ]; @@ -47,7 +50,7 @@ in { inherit packages; - devShells = devShells // { default = devShells.ghc92; }; + devShells = devShells // { default = devShells."ghc${default}"; }; checks = packages; }); diff --git a/nix/overlay.nix b/nix/overlay.nix index 7d0493b1..deac0ae4 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -17,6 +17,28 @@ let polysemy-plugin = c2n "polysemy-plugin" ../polysemy-plugin; } // pkgs.lib.optionalAttrs (compiler == "ghc96") { type-errors = pkgs.haskell.lib.doJailbreak super.type-errors; + } // pkgs.lib.optionalAttrs (compiler == "ghc98") { + some = pkgs.haskell.lib.doJailbreak super.some; + type-errors = pkgs.haskell.lib.doJailbreak super.type-errors; + th-abstraction = self.callHackageDirect { + pkg = "th-abstraction"; + ver = "0.6.0.0"; + sha256 = "1w07ysxrbjm1rhlg9nhlq5y72s5wr4vqmcy99chvyb56wka0grbq"; + } {}; + tagged = self.callHackageDirect { + pkg = "tagged"; + ver = "0.8.8"; + sha256 = "1m2bcf0sr1z28gnl2k8xibcsv80kd35816c9c7ji045jbxg27xd9"; + } {}; + hspec = super.hspec_2_11_7; + hspec-core = super.hspec-core_2_11_7; + hspec-meta = super.hspec-meta_2_11_7; + hspec-discover = super.hspec-discover_2_11_7; + doctest = self.callHackageDirect { + pkg = "doctest"; + ver = "0.22.2"; + sha256 = "193vrmxcnn9fxn7bc6y7jg8qwr13z9a26qqn0c294mn67il18cqn"; + } {}; }; in pkgs.haskell.packages.${compiler}.override { inherit overrides; } // { inherit pkgs; }