Skip to content

Commit

Permalink
gitit: drop reference prevention code
Browse files Browse the repository at this point in the history
All these references would (indirectly) incur a GHC requisite which is
prevented by #304352 via justStaticExecutables. Consequently, we can
stop setting disallowedReferences.

As it turns out the references we were removing aren't currently
created, so our life gets even easier.
  • Loading branch information
sternenseemann committed Jun 7, 2024
1 parent a5d1b90 commit 1285457
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions pkgs/applications/misc/gitit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,7 @@ let
static = haskell.lib.compose.justStaticExecutables plugins;

in
(haskell.lib.compose.overrideCabal (drv: {
buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ];
}) static).overrideAttrs (drv: {

# These libraries are still referenced, because they generate
# a `Paths_*` module for figuring out their version.
# The `Paths_*` module is generated by Cabal, and contains the
# version, but also paths to e.g. the data directories, which
# lead to a transitive runtime dependency on the whole GHC distribution.
# This should ideally be fixed in haskellPackages (or even Cabal),
# but a minimal gitit is important enough to patch it manually.
disallowedReferences = [
haskellPackages.pandoc-types
haskellPackages.HTTP
haskellPackages.pandoc
haskellPackages.happstack-server
haskellPackages.filestore
];
postInstall = ''
remove-references-to \
-t ${haskellPackages.pandoc-types} \
$out/bin/gitit
remove-references-to \
-t ${haskellPackages.HTTP} \
$out/bin/gitit
remove-references-to \
-t ${haskellPackages.pandoc} \
$out/bin/gitit
remove-references-to \
-t ${haskellPackages.happstack-server} \
$out/bin/gitit
remove-references-to \
-t ${haskellPackages.filestore} \
$out/bin/gitit
'';

static.overrideAttrs (drv: {
meta = drv.meta // {
maintainers = drv.meta.maintainers or []
++ [ lib.maintainers.Profpatsch ];
Expand Down

0 comments on commit 1285457

Please sign in to comment.