From dbe2c9e2ba9df18cf2471c8cd5cd43fe16b65a6a Mon Sep 17 00:00:00 2001 From: maralorn Date: Sun, 2 Jul 2023 11:18:03 +0200 Subject: [PATCH] haskellPackages.pandoc-cli: Expose overriden dependencies --- .../haskell-modules/configuration-common.nix | 53 +++++++++++-------- .../configuration-hackage2nix/broken.yaml | 2 - .../haskell-modules/hackage-packages.nix | 4 -- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 1378736d6761..d54e11f1d2f2 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1786,35 +1786,44 @@ self: super: { # https://github.com/jgm/pandoc/issues/7163 pandoc = dontCheck super.pandoc; - # This is sort of an unfortunate situation. - # # Since pandoc-3, the actual `pandoc` executable is in the pandoc-cli # package. It is no longer distributed in the pandoc package itself. So for # people that want to use the `pandoc` cli tool, they must use pandoc-cli. # - # The unfortunate thing is that LTS-21 includes pandoc-3.0, but there is no - # release of pandoc-cli that supports pandoc-3.0. The earliest release - # of pandoc-cli effectively requires pandoc-3.1. We need a bunch of - # overrides to be able to build pandoc-cli with pandoc-3.0. - pandoc-cli = super.pandoc-cli.overrideScope (self: super: { - # pandoc-cli requires pandoc >= 3.1 - pandoc = self.pandoc_3_1_4; + # The unfortunate thing is that LTS-21 includes no possible build plan for + # pandoc-cli, because pandoc-cli pandoc-lua-engine are not in LTS 21. + # To get pandoc-lua-engine building we need either to downgrade a ton + # of hslua-module-* packages from stackage or use pandoc 3.1 although + # LTS contains pandoc 3.0. + inherit (let + pandoc-cli-overlay = self: super: { + # pandoc-cli requires pandoc >= 3.1 + pandoc = self.pandoc_3_1_4; - # pandoc depends on crypton-connection, which requires tls >= 1.7 - tls = self.tls_1_7_0; + # pandoc depends on crypton-connection, which requires tls >= 1.7 + tls = self.tls_1_7_0; - # pandoc depends on http-client-tls, which only starts depending - # on crypton-connection in http-client-tls-0.3.6.2. - http-client-tls = self.http-client-tls_0_3_6_2; + # pandoc depends on http-client-tls, which only starts depending + # on crypton-connection in http-client-tls-0.3.6.2. + http-client-tls = self.http-client-tls_0_3_6_2; - # pandoc requires recent versions of skylighting - skylighting = self.skylighting_0_13_3; - skylighting-core = self.skylighting-core_0_13_3; - - # broken in haskellPackages - pandoc-lua-engine = markUnbroken super.pandoc-lua-engine; - pandoc-server = markUnbroken super.pandoc-server; - }); + # pandoc requires recent versions of skylighting + skylighting = self.skylighting_0_13_3; + skylighting-core = self.skylighting-core_0_13_3; + }; + in { + pandoc-cli = super.pandoc-cli.overrideScope pandoc-cli-overlay; + pandoc_3_1_4 = doDistribute (super.pandoc_3_1_4.overrideScope pandoc-cli-overlay); + skylighting_0_13_3 = doDistribute (super.skylighting_0_13_3.overrideScope pandoc-cli-overlay); + skylighting-core_0_13_3 = doDistribute (super.skylighting-core_0_13_3.overrideScope pandoc-cli-overlay); + pandoc-lua-engine = super.pandoc-lua-engine.overrideScope pandoc-cli-overlay; + }) + pandoc-cli + pandoc_3_1_4 + skylighting_0_13_3 + skylighting-core_0_13_3 + pandoc-lua-engine + ; crypton-x509 = lib.pipe diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 8b6a26ea0bbd..e3821947cd24 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -3858,12 +3858,10 @@ broken-packages: - pandoc-filter-indent - pandoc-include - pandoc-lens - - pandoc-lua-engine - pandoc-markdown-ghci-filter - pandoc-placetable - pandoc-plantuml-diagrams - pandoc-pyplot - - pandoc-server - pandoc-unlit - pandoc-utils - pandora diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 12b7c4334b21..3d33889a46a3 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -216708,8 +216708,6 @@ self: { ]; description = "Lua engine to power custom pandoc conversions"; license = lib.licenses.gpl2Plus; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "pandoc-lua-marshal" = callPackage @@ -216907,8 +216905,6 @@ self: { ]; description = "Pandoc document conversion as an HTTP servant-server"; license = lib.licenses.gpl2Plus; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "pandoc-sidenote" = callPackage