diff --git a/flake.lock b/flake.lock index eb251c7..5117855 100644 --- a/flake.lock +++ b/flake.lock @@ -35,11 +35,11 @@ }, "haskell-flake": { "locked": { - "lastModified": 1675724013, - "narHash": "sha256-RHkxnmNRTwfxSzP/3UUil30h2HyC7QfqYafoJRdyTmE=", + "lastModified": 1676144980, + "narHash": "sha256-LlB5XRJmAvMc0mTrIntYGrmWX9K/aoDSwylZ4UHQizQ=", "owner": "srid", "repo": "haskell-flake", - "rev": "7c4af21238b3c94e5eb61daad78fec7df4eaec51", + "rev": "5d1f6d9a7695e4cf70ab129fd5dbfe75b018614f", "type": "github" }, "original": { @@ -82,6 +82,32 @@ "type": "github" } }, + "nixpkgs-140774-workaround": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "haskell-flake": [ + "haskell-flake" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1676145473, + "narHash": "sha256-EhMHmT2uMwZKdZx7nSbxe0ABqfkxPZZWVVWCSJDMLGw=", + "owner": "srid", + "repo": "nixpkgs-140774-workaround", + "rev": "55fd894a106502653165fe98a4aa3bc0946e3674", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "nixpkgs-140774-workaround", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "dir": "lib", @@ -123,6 +149,7 @@ "haskell-flake": "haskell-flake", "mission-control": "mission-control", "nixpkgs": "nixpkgs_2", + "nixpkgs-140774-workaround": "nixpkgs-140774-workaround", "treefmt-nix": "treefmt-nix" } }, diff --git a/flake.nix b/flake.nix index 83581a5..b59f2ef 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,11 @@ treefmt-nix.url = "github:numtide/treefmt-nix"; flake-root.url = "github:srid/flake-root"; mission-control.url = "github:Platonic-Systems/mission-control"; + + nixpkgs-140774-workaround.url = "github:srid/nixpkgs-140774-workaround"; + nixpkgs-140774-workaround.inputs.nixpkgs.follows = "nixpkgs"; + nixpkgs-140774-workaround.inputs.flake-parts.follows = "flake-parts"; + nixpkgs-140774-workaround.inputs.haskell-flake.follows = "haskell-flake"; }; outputs = inputs@{ self, nixpkgs, flake-parts, ... }: @@ -22,29 +27,11 @@ # The "main" project. You can have multiple projects, but this template # has only one. haskellProjects.main = { - packages = { - haskell-template.root = ./.; - }; - overrides = - let - # Workaround for https://github.com/NixOS/nixpkgs/issues/140774 - nixpkgsWorkaround = - let - disableSeparateBinOutput = - pkgs.haskell.lib.compose.overrideCabal (_: { enableSeparateBinOutput = false; }); - in - self: super: lib.optionalAttrs (system == "aarch64-darwin") { - ghcid = disableSeparateBinOutput super.ghcid; - ormolu = disableSeparateBinOutput super.ormolu; - }; - projectOverrides = self: super: { - # Add your own overrides here. - }; - in - lib.composeManyExtensions [ - nixpkgsWorkaround - projectOverrides - ]; + imports = [ + inputs.nixpkgs-140774-workaround.haskellFlakeProjectModules.default + ]; + # packages.haskell-template.root = ./.; # Auto-discovered by haskell-flake + overrides = self: super: { }; devShell = { tools = hp: { treefmt = config.treefmt.build.wrapper;