Skip to content

Commit

Permalink
Add ghc98 to the nix config
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Dec 28, 2023
1 parent ab8c12e commit 42fac70
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};

Expand All @@ -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));
Expand All @@ -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
];
Expand All @@ -47,7 +50,7 @@
in {
inherit packages;

devShells = devShells // { default = devShells.ghc92; };
devShells = devShells // { default = devShells."ghc${default}"; };

checks = packages;
});
Expand Down
22 changes: 22 additions & 0 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

0 comments on commit 42fac70

Please sign in to comment.