diff options
author | sternenseemann <sternenseemann@systemli.org> | 2024-06-06 11:57:50 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2024-06-07 11:18:28 +0200 |
commit | 2810884b1fc0664d97caf702ceb4e1d6b21df8c9 (patch) | |
tree | 95c846759a2a35a47e22c0c61ded6f461db87f82 /pkgs/applications/misc/gitit | |
parent | 59b26ed0604ddd06148be94c6dd4e95d85d50c75 (diff) |
gitit: fix build with plugin support
Since it incurs a GHC reference anyways, we have to disable justStaticExecutables!
Diffstat (limited to 'pkgs/applications/misc/gitit')
-rw-r--r-- | pkgs/applications/misc/gitit/default.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/pkgs/applications/misc/gitit/default.nix b/pkgs/applications/misc/gitit/default.nix index 4a4d5d6c3c17f..a22e65549d107 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 |