From 2810884b1fc0664d97caf702ceb4e1d6b21df8c9 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 6 Jun 2024 11:57:50 +0200 Subject: [PATCH] gitit: fix build with plugin support Since it incurs a GHC reference anyways, we have to disable justStaticExecutables! --- pkgs/applications/misc/gitit/default.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/misc/gitit/default.nix b/pkgs/applications/misc/gitit/default.nix index 4a4d5d6c3c17..a22e65549d10 100644 --- a/pkgs/applications/misc/gitit/default.nix +++ b/pkgs/applications/misc/gitit/default.nix @@ -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