This works around https://github.com/NixOS/nixpkgs/issues/286285 by passing --enable-split-sections instead of ghc-options. --- --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -245,8 +245,7 @@ let (enableFeature doBenchmark "benchmarks") "--enable-library-vanilla" # TODO: Should this be configurable? (enableFeature enableLibraryForGhci "library-for-ghci") - ] ++ optionals (enableDeadCodeElimination && (lib.versionOlder "8.0.1" ghc.version)) [ - "--ghc-option=-split-sections" + (enableFeature enableDeadCodeElimination "split-sections") ] ++ optionals dontStrip [ "--disable-library-stripping" "--disable-executable-stripping"