Skip to content

Commit

Permalink
ghc8102BinaryMinimal: Re-add docs, remove more profiling files
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Nov 4, 2020
1 parent 22e9260 commit 7bd21d3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkgs/development/compilers/ghc/8.10.2-binary.nix
Expand Up @@ -7,8 +7,6 @@
# regular builds and GHC bootstrapping.
# This is "useful" for staying within hydra's output limits for at least the
# aarch64-linux architecture.
# Examples of unnecessary files are the bundled documentation and files that
# are only needed for profiling builds.
, minimal ? false
}:

Expand Down Expand Up @@ -182,11 +180,15 @@ stdenv.mkDerivation rec {
done
'' +
stdenv.lib.optionalString minimal ''
# Remove profiling objects
# Remove profiling files
find $out -type f -name '*.p_o' -delete
find $out -type f -name '*.p_hi' -delete
find $out -type f -name '*_p.a' -delete
rm $out/lib/ghc-*/bin/ghc-iserv-prof
# Remove docs
rm -r $out/share/{doc,man}
# Hydra will redistribute this derivation, so we have to keep the docs for
# legal reasons (retaining the legal notices etc)
# As a last resort we could unpack the docs separately and symlink them in.
# They're in $out/share/{doc,man}.
'';

doInstallCheck = true;
Expand Down

0 comments on commit 7bd21d3

Please sign in to comment.