From 476f168793ae6df83e81aed2e193440634399947 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Wed, 14 Dec 2022 15:46:11 -0800 Subject: [PATCH 1/2] fix fourmolu with -f-fixity-th in nix env --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c78cd3a843..f3518d2761 100644 --- a/flake.nix +++ b/flake.nix @@ -129,7 +129,10 @@ then overrideCabal hsuper.ormolu (_: { enableSeparateBinOutput = false; }) else hsuper.ormolu; - fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {}; + fourmolu = + addBuildDepend + (appendConfigureFlag (hself.callCabal2nix "fourmolu" inputs.fourmolu {}) "-f-fixity-th") + hself.file-embed; }; hlsSources = From f0bcb95e2c0e7fa923290a98793ae0d206e0d0d8 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Fri, 16 Dec 2022 07:16:51 -0800 Subject: [PATCH 2/2] added a small comment and link to the issue. --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index f3518d2761..99820fc88b 100644 --- a/flake.nix +++ b/flake.nix @@ -129,6 +129,8 @@ then overrideCabal hsuper.ormolu (_: { enableSeparateBinOutput = false; }) else hsuper.ormolu; + # Due to the following issue, fixity-th should be disabled, especially for darwin. + # https://github.com/fourmolu/fourmolu/issues/238 fourmolu = addBuildDepend (appendConfigureFlag (hself.callCabal2nix "fourmolu" inputs.fourmolu {}) "-f-fixity-th")