diff --git a/pkgs/development/haskell-modules/lib/compose.nix b/pkgs/development/haskell-modules/lib/compose.nix index d84c804272db..065dc2dcad86 100644 --- a/pkgs/development/haskell-modules/lib/compose.nix +++ b/pkgs/development/haskell-modules/lib/compose.nix @@ -285,7 +285,11 @@ rec { enableLibraryProfiling = false; isLibrary = false; doHaddock = false; - postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc"; + postFixup = drv.postFixup or "" + '' + + # Remove every directory which could have links to other store paths. + rm -rf $out/lib $out/nix-support $out/share/doc + ''; }); /* Build a source distribution tarball instead of using the source files