3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #102833 from hercules-ci/ghc8102BinaryMinimal-fix-docs

ghc8102BinaryMinimal: fix docs as legally required
This commit is contained in:
Domen Kožar 2020-11-06 11:38:46 +01:00 committed by GitHub
commit fad48e3230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,8 +7,6 @@
# regular builds and GHC bootstrapping. # regular builds and GHC bootstrapping.
# This is "useful" for staying within hydra's output limits for at least the # This is "useful" for staying within hydra's output limits for at least the
# aarch64-linux architecture. # aarch64-linux architecture.
# Examples of unnecessary files are the bundled documentation and files that
# are only needed for profiling builds.
, minimal ? false , minimal ? false
}: }:
@ -182,11 +180,15 @@ stdenv.mkDerivation rec {
done done
'' + '' +
stdenv.lib.optionalString minimal '' stdenv.lib.optionalString minimal ''
# Remove profiling objects # Remove profiling files
find $out -type f -name '*.p_o' -delete 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 rm $out/lib/ghc-*/bin/ghc-iserv-prof
# Remove docs # Hydra will redistribute this derivation, so we have to keep the docs for
rm -r $out/share/{doc,man} # 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; doInstallCheck = true;
@ -210,18 +212,11 @@ stdenv.mkDerivation rec {
enableShared = true; enableShared = true;
}; };
meta = let meta = {
platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
in {
homepage = "http://haskell.org/ghc"; homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler"; description = "The Glasgow Haskell Compiler";
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.bsd3;
platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
# 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;
maintainers = with stdenv.lib.maintainers; [ lostnet ]; maintainers = with stdenv.lib.maintainers; [ lostnet ];
}; };
} }