From dda47e489aee9a7925a79e7c35775d5428a90585 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 4 Nov 2020 20:40:14 +0000 Subject: [PATCH 1/2] ghc8102BinaryMinimal: Re-add docs, remove more profiling files (cherry picked from commit 7bd21d3e2da8b9ae394258cef9f18bf0a8dd2d47) --- pkgs/development/compilers/ghc/8.10.2-binary.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.2-binary.nix b/pkgs/development/compilers/ghc/8.10.2-binary.nix index cc9491ede240..38454147e394 100644 --- a/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -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 }: @@ -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; From 6b377f29687e48f37222395324d7256f17acb654 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 4 Nov 2020 20:41:07 +0000 Subject: [PATCH 2/2] ghc8102Binary*: simplify meta Not distributing dependencies via hydraPlatforms does not work, so we keep meta simple. (cherry picked from commit 4643796794897f2baa3a8015de5a9c9fd416f1ae) --- pkgs/development/compilers/ghc/8.10.2-binary.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.2-binary.nix b/pkgs/development/compilers/ghc/8.10.2-binary.nix index 38454147e394..1a1a9ca0160e 100644 --- a/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -212,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 ]; }; }