diff --git a/flake.lock b/flake.lock index 88b85fe..9df30d0 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -20,17 +20,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703305083, - "narHash": "sha256-8xecxMrq4+18tqTuWU/UqP0hYVvCJiODKkTckVIBAoE=", + "lastModified": 1720181791, + "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "54ce5abce7e1531376455c7b32a195329c2587f0", + "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", "type": "github" }, "original": { "owner": "nixos", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", - "rev": "54ce5abce7e1531376455c7b32a195329c2587f0", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 3a7ac81..a0801bb 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Higher-order, low-boilerplate free monads."; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/54ce5abce7e1531376455c7b32a195329c2587f0"; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -13,12 +13,12 @@ hsPkgs = nixpkgs: compiler: import ./nix/overlay.nix { inherit system nixpkgs compiler; }; ghcs = { - "810" = hsPkgs nixpkgs "ghc810"; "90" = hsPkgs nixpkgs "ghc90"; "92" = hsPkgs nixpkgs "ghc92"; "94" = hsPkgs nixpkgs "ghc94"; "96" = hsPkgs nixpkgs "ghc96"; "98" = hsPkgs nixpkgs "ghc98"; + "910" = hsPkgs nixpkgs "ghc910"; }; default = "96"; @@ -39,7 +39,7 @@ packages = p: [p.polysemy p.polysemy-plugin]; buildInputs = with ghc; [ cabal-install - ] ++ nixpkgs.lib.optionals (name != "98" && name != "810") [ + ] ++ nixpkgs.lib.optionals (name != "910" && name != "98" && name != "90") [ (ghc.pkgs.haskell.lib.dontCheck ghcid) haskell-language-server ]; diff --git a/nix/overlay.nix b/nix/overlay.nix index 1d1c6fe..4035e93 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -5,40 +5,53 @@ }: let pkgs = import nixpkgs { inherit system; }; + hlib = pkgs.haskell.lib; overrides = self: super: let filter = pkgs.nix-gitignore.gitignoreSourcePure [./source-filter]; - c2n = name: src: pkgs.haskell.lib.disableLibraryProfiling (self.callCabal2nix name (filter src) {}); + c2n = name: src: self.callCabal2nix name (filter src) {}; in { polysemy = c2n "polysemy" ../.; 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; + } // pkgs.lib.optionalAttrs (compiler == "ghc910") { + + cabal-doctest = self.callHackageDirect { + pkg = "cabal-doctest"; + ver = "1.0.10"; + sha256 = "sha256-h6lGtI8czHKiYyoSrrMKrpitidhH5MBfczl9JkJ7Y0E="; + } {}; + + call-stack = hlib.dontCheck super.call-stack; + + doctest = hlib.dontCheck (self.callHackageDirect { + pkg = "doctest"; + ver = "0.22.2"; + sha256 = "193vrmxcnn9fxn7bc6y7jg8qwr13z9a26qqn0c294mn67il18cqn"; + rev = { + revision = "1"; + sha256 = "sha256-bZcyn5y1PS27VOv+j4EgIQWRd2aizi5EKs15BoL+NvE="; + }; + } {}); + + ghc-tcplugins-extra = self.callHackageDirect { + pkg = "ghc-tcplugins-extra"; + ver = "0.4.6"; + sha256 = "sha256-dFCNSkiKP5pr8Kx/p5Cb+WJ4cp/xcQA2Y5JgPwQ0CzQ="; + } {}; + + os-string = null; + + primitive = hlib.dontCheck super.primitive_0_9_0_0; + th-abstraction = self.callHackageDirect { pkg = "th-abstraction"; ver = "0.7.0.0"; sha256 = "sha256-YNCvJ9C8PsOTT+B4NoRT6kA2bOFk4F6ygm8hzWMH+1I="; } {}; - 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; }