From 10bae756d050b14ae870cda7f4b4b2309a11257d Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Wed, 7 Dec 2022 14:30:43 +0800 Subject: [PATCH 1/2] Fix #19 This fixes #19 by downgrading the compiler to 8.10 (I still don't think 9.0 should be used in production). bytestring < 0.11.4 (which as of today has not been released to https://hackage.haskell.org/package/bytestring), is broken, as per haskell/bytestring#538. This in turn shows up in yesodweb/wai#894, and ultimately causes #19. --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 95cfe23..b90684a 100644 --- a/flake.nix +++ b/flake.nix @@ -11,12 +11,14 @@ outputs = { nixpkgs, utils, ... }: let - compiler = "ghc92"; + compiler = "ghc810"; overlay = pkgsNew: pkgsOld: { cabal2nix-unwrapped = pkgsNew.haskell.lib.justStaticExecutables - pkgsNew.haskell.packages."${compiler}".cabal2nix; + # use cabal2nix from 9.2 here, because cabal2nix from 8.10 can't + # read cabal-version: 3.6 + pkgsNew.haskell.packages.ghc92.cabal2nix; haskell = pkgsOld.haskell // { packages = pkgsOld.haskell.packages // { From 558b7b360a858a9ec68c31d2054fdd4132cfee38 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Wed, 7 Dec 2022 15:03:35 +0800 Subject: [PATCH 2/2] Update nix-serve-ng.cabal --- nix-serve-ng.cabal | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nix-serve-ng.cabal b/nix-serve-ng.cabal index 2484fe7..adeb263 100644 --- a/nix-serve-ng.cabal +++ b/nix-serve-ng.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.6 +cabal-version: 2.2 name: nix-serve-ng version: 1.0.1 synopsis: @@ -60,7 +60,8 @@ executable nix-serve if os(darwin) extra-libraries: c++ - hsc2hs-options: --cc clang++ + -- this needs cabal-version: 3.6 + -- hsc2hs-options: --cc clang++ elif os(linux) extra-libraries: stdc++ else