gitit: fix build with plugin support

Since it incurs a GHC reference anyways, we have to disable
justStaticExecutables!
This commit is contained in:
sternenseemann 2024-06-06 11:57:50 +02:00
parent 59b26ed060
commit 2810884b1f

View File

@ -1,4 +1,4 @@
{ lib, haskellPackages, haskell, removeReferencesTo
{ lib, haskellPackages, haskell
# “Plugins” are a fancy way of saying gitit will invoke
# GHC at *runtime*, which in turn makes it pull GHC
# into its runtime closure. Only enable if you really need
@ -7,16 +7,18 @@
, pluginSupport ? false
}:
# this is similar to what we do with the pandoc executable
let
plain = haskellPackages.gitit;
plugins =
if pluginSupport
then plain
else haskell.lib.compose.disableCabalFlag "plugins" plain;
static = haskell.lib.compose.justStaticExecutables plugins;
inherit (haskell.lib.compose)
enableCabalFlag
disableCabalFlag
justStaticExecutables
;
base = (if pluginSupport then enableCabalFlag else disableCabalFlag)
"plugins"
haskellPackages.gitit;
in
static
if pluginSupport
then base
else justStaticExecutables base