diff --git a/flake.lock b/flake.lock index 9b7e5e5..71470e8 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1690933134, - "narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=", + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", "type": "github" }, "original": { @@ -18,29 +18,13 @@ "type": "github" } }, - "generic-data-functions": { - "flake": false, - "locked": { - "lastModified": 1691181981, - "narHash": "sha256-ORD6AAiXM5tNqiau+KZ24GSnHX2cBMl071jjZab+gzo=", - "owner": "raehik", - "repo": "generic-data-functions", - "rev": "b09706c468300c6e8f701871a08296244ba2b0e1", - "type": "github" - }, - "original": { - "owner": "raehik", - "repo": "generic-data-functions", - "type": "github" - } - }, "haskell-flake": { "locked": { - "lastModified": 1691763544, - "narHash": "sha256-QQsSI5VXm0bBijeGSXXNf4fyw76/XmN67NGbmTCx71s=", + "lastModified": 1699388095, + "narHash": "sha256-uutZJWtd6rKwoLYLFGsjrA2zu06uRdGC//FANb4azgU=", "owner": "srid", "repo": "haskell-flake", - "rev": "f16e7ac05b1f22b66ef05b7fcc8a96281bb2b749", + "rev": "7029034b00bd7c9225d74915a6a53e5b44b4a1d3", "type": "github" }, "original": { @@ -51,16 +35,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1692355892, - "narHash": "sha256-kskXKeYG9aRkur4cB4OtsetvDsmttGeqllLwyePNmI4=", + "lastModified": 1700014976, + "narHash": "sha256-dSGpS2YeJrXW5aH9y7Abd235gGufY3RuZFth6vuyVtU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "edcf830429642d06eee298cbcff6b0e61fa24cd4", + "rev": "592047fc9e4f7b74a4dc85d1b9f5243dfe4899e3", "type": "github" }, "original": { "owner": "nixos", - "ref": "haskell-updates", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -68,11 +52,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1690881714, - "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9e1960bc196baf6881340d53dccb203a951745a2", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", "type": "github" }, "original": { @@ -86,7 +70,6 @@ "root": { "inputs": { "flake-parts": "flake-parts", - "generic-data-functions": "generic-data-functions", "haskell-flake": "haskell-flake", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 7f62c41..de037ad 100644 --- a/flake.nix +++ b/flake.nix @@ -1,34 +1,46 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/haskell-updates"; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; haskell-flake.url = "github:srid/haskell-flake"; - generic-data-functions = { - url = "github:raehik/generic-data-functions"; - flake = false; - }; }; - outputs = inputs@{ self, nixpkgs, flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - systems = nixpkgs.lib.systems.flakeExposed; + outputs = inputs: + let + # simple devshell for non-dev compilers: really just want `cabal repl` + nondevDevShell = compiler: { + mkShellArgs.name = "${compiler}-binrep"; + hoogle = false; + tools = _: { + hlint = null; + haskell-language-server = null; + ghcid = null; + }; + }; + in + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + systems = inputs.nixpkgs.lib.systems.flakeExposed; imports = [ inputs.haskell-flake.flakeModule ]; perSystem = { self', pkgs, config, ... }: { - packages.default = self'.packages.binrep; - haskellProjects.ghc96 = import ./haskell-flake-ghc96.nix pkgs; - haskellProjects.default = { - #basePackages = config.haskellProjects.ghc96.outputs.finalPackages; - packages = { - #generic-data-functions.source = inputs.generic-data-functions; - #strongweak.source = "0.6.0"; - #flatparse.source = "0.4.1.0"; - }; - devShell = { - tools = hp: { - ghcid = null; # broken on GHC 9.6? fsnotify - hlint = null; # broken on GHC 9.6? - haskell-language-server = null; # TAKES AGES TO BUILD FFS + packages.default = self'.packages.ghc96-binrep; + devShells.default = self'.devShells.ghc96; + haskellProjects.ghc96 = { + # 2023-11-14: GHC 9.6 base package set is borked + # PR: https://github.com/NixOS/nixpkgs/pull/267477 + basePackages = pkgs.haskell.packages.ghc96.override { + overrides = self: super: { + fgl = self.fgl_5_8_2_0; + th-desugar = self.th-desugar_1_16; }; }; + devShell.mkShellArgs.name = "ghc96-binrep"; + }; + haskellProjects.ghc94 = { + basePackages = pkgs.haskell.packages.ghc94; + devShell = nondevDevShell "ghc94"; + }; + haskellProjects.ghc92 = { + basePackages = pkgs.haskell.packages.ghc92; + devShell = nondevDevShell "ghc92"; }; }; };