Skip to content

Commit

Permalink
Merge pull request #102833 from hercules-ci/ghc8102BinaryMinimal-fix-…
Browse files Browse the repository at this point in the history
…docs

ghc8102BinaryMinimal: fix docs as legally required
  • Loading branch information
domenkozar authored Nov 6, 2020
2 parents 73f591a + 6b377f2 commit fad48e3
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions pkgs/development/compilers/ghc/8.10.2-binary.nix
Original file line number Diff line number Diff line change
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 All @@ -210,18 +212,11 @@ stdenv.mkDerivation rec {
enableShared = true;
};

meta = let
platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
in {
meta = {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
license = stdenv.lib.licenses.bsd3;

# The minimal variation can not be distributed because it removes the
# documentation, including licensing information that is required for
# distribution.
inherit platforms;
hydraPlatforms = stdenv.lib.optionals (!minimal) platforms;
platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
maintainers = with stdenv.lib.maintainers; [ lostnet ];
};
}

0 comments on commit fad48e3

Please sign in to comment.