Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d4905b1370d2
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 49cd7307d04e
Choose a head ref

Commits on Oct 21, 2020

  1. Copy the full SHA
    1c2ee21 View commit details

Commits on Oct 23, 2020

  1. Copy the full SHA
    c252654 View commit details

Commits on Oct 24, 2020

  1. Merge pull request #101214 from lostnet/ghcpr1a

    ghc:8.10.2Binary bootstrap for 8.8 on aarch64 (#97407)
    cdepillabout authored Oct 24, 2020
    Copy the full SHA
    81881f2 View commit details

Commits on Oct 25, 2020

  1. coreutils: fix aarch64 build by upstream patch

    https://hydra.nixos.org/build/128781441
    We can't use fetchpatch here, unfortunately.
    vcunat committed Oct 25, 2020
    Copy the full SHA
    803ca85 View commit details
  2. Copy the full SHA
    4bd836b View commit details

Commits on Oct 26, 2020

  1. Recover the complicated situation after my bad merge

    I made a mistake merge.  Reverting it in c778945 undid the state
    on master, but now I realize it crippled the git merge mechanism.
    As the merge contained a mix of commits from `master..staging-next`
    and other commits from `staging-next..staging`, it got the
    `staging-next` branch into a state that was difficult to recover.
    
    I reconstructed the "desired" state of staging-next tree by:
     - checking out the last commit of the problematic range: 4effe76
     - `git rebase -i --preserve-merges a8a018d` - dropping the mistaken
       merge commit and its revert from that range (while keeping
       reapplication from 4effe76)
     - merging the last unaffected staging-next commit (803ca85)
     - fortunately no other commits have been pushed to staging-next yet
     - applying a diff on staging-next to get it into that state
    vcunat committed Oct 26, 2020
    Copy the full SHA
    89023c3 View commit details

Commits on Oct 27, 2020

  1. Copy the full SHA
    8c9bb91 View commit details
  2. hostctl: init at 1.0.14

    David Arnold committed Oct 27, 2020
    Copy the full SHA
    b016ae0 View commit details

Commits on Oct 30, 2020

  1. Merge pull request #100048 from xoe-labs/da-package-hostctl

    hostctl: init at 1.0.14
    timokau authored Oct 30, 2020
    Copy the full SHA
    ae01350 View commit details

Commits on Oct 31, 2020

  1. libical: skip timezone tests

    They are incompatible with tzdata2020c.
    
    There are still some other failing tests but I am not sure if they are also due to timezones.
    jtojnar committed Oct 31, 2020
    Copy the full SHA
    9c5154b View commit details
  2. Copy the full SHA
    dfd3ede View commit details

Commits on Nov 1, 2020

  1. Copy the full SHA
    2029ca3 View commit details
  2. ghostscript: clean up

    * Do not use pkgconfig alias.
    * Move version & hash inline.
    jtojnar authored and FRidh committed Nov 1, 2020
    Copy the full SHA
    6b76a2d View commit details
  3. Copy the full SHA
    d18c016 View commit details
  4. Merge master into staging-next

    FRidh committed Nov 1, 2020
    Copy the full SHA
    7a8d5dc View commit details
  5. Merge master into staging-next

    FRidh committed Nov 1, 2020
    Copy the full SHA
    fe9f559 View commit details

Commits on Nov 3, 2020

  1. haskell.compiler.ghc8102BinaryMinimal: init

    To stay within hydra limit of 2^31 output size on aarch64-linux
    roberth committed Nov 3, 2020
    Copy the full SHA
    f8ad73b View commit details
  2. Merge master into staging-next

    FRidh committed Nov 3, 2020
    Copy the full SHA
    2379662 View commit details
  3. Copy the full SHA
    a31fd3c View commit details

Commits on Nov 4, 2020

  1. Merge master into staging-next

    FRidh committed Nov 4, 2020
    Copy the full SHA
    9e6d7d3 View commit details
  2. haskell.compiler.integer-simple: Exclude ghc8102Binary*

    (cherry picked from commit fc15626)
    roberth committed Nov 4, 2020
    Copy the full SHA
    f73df04 View commit details
  3. postgresql: Fix timetz test failure

    A recent addition to the test suite turned out to be sensitive to
    DST. The main code is ok. Patch only required to make test succeed.
    
    See https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4a071afbd056282746a5bc9362e87f579a56402d
    roberth authored and FRidh committed Nov 4, 2020
    Copy the full SHA
    83163b4 View commit details
  4. Merge pull request #101207 from NixOS/staging-next

    Staging next
    FRidh authored Nov 4, 2020
    Copy the full SHA
    49cd730 View commit details
Showing with 1,030 additions and 2,631 deletions.
  1. +6 −1 doc/stdenv/stdenv.xml
  2. +2 −2 pkgs/applications/version-management/git-and-tools/git/default.nix
  3. +10 −2 pkgs/build-support/install-shell-files/default.nix
  4. +95 −30 pkgs/build-support/setup-hooks/install-shell-files.sh
  5. +3 −3 pkgs/data/misc/tzdata/default.nix
  6. +6 −1 pkgs/development/compilers/gcc/builder.sh
  7. +64 −11 pkgs/development/compilers/ghc/8.10.2-binary.nix
  8. +5 −1 pkgs/development/compilers/ghc/8.8.4.nix
  9. +2 −9 pkgs/development/compilers/go/1.4.nix
  10. +4 −6 pkgs/development/compilers/purescript/psc-package/default.nix
  11. +10 −10 pkgs/development/compilers/rust/{1_46.nix → 1_47.nix}
  12. +9 −3 pkgs/development/compilers/rust/binary.nix
  13. +2 −2 pkgs/development/interpreters/ruby/rubygems/default.nix
  14. +2 −2 pkgs/development/libraries/enchant/2.x.nix
  15. +7 −5 pkgs/development/libraries/expat/default.nix
  16. +2 −2 pkgs/development/libraries/freetype/default.nix
  17. +73 −0 pkgs/development/libraries/gamin/abstract-socket-namespace.patch
  18. +6 −4 pkgs/development/libraries/gamin/default.nix
  19. +2 −2 pkgs/development/libraries/harfbuzz/default.nix
  20. +3 −3 pkgs/development/libraries/jbig2dec/default.nix
  21. +1 −1 pkgs/development/libraries/libical/default.nix
  22. +10 −7 pkgs/development/libraries/libinput/default.nix
  23. +0 −211 pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch
  24. +14 −8 pkgs/development/libraries/libvpx/default.nix
  25. +10 −5 pkgs/development/libraries/libwebp/default.nix
  26. +3 −4 pkgs/development/libraries/mesa/default.nix
  27. +15 −14 pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch
  28. +0 −25 pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch
  29. +0 −12 pkgs/development/libraries/mesa/missing-includes.patch
  30. +2 −2 pkgs/development/libraries/openssl/default.nix
  31. +7 −0 pkgs/development/libraries/p11-kit/default.nix
  32. +6 −4 pkgs/development/libraries/zeromq/4.x.nix
  33. +2 −2 pkgs/development/python-modules/arrow/default.nix
  34. +18 −6 pkgs/development/python-modules/pycairo/default.nix
  35. +12 −7 pkgs/development/tools/build-managers/cmake/default.nix
  36. +40 −0 pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch
  37. +5 −0 pkgs/development/tools/build-managers/meson/default.nix
  38. +0 −835 pkgs/misc/ghostscript/0001-Bug-702364-Fix-missing-echogs-dependencies.patch
  39. +7 −17 pkgs/misc/ghostscript/default.nix
  40. +2 −11 pkgs/os-specific/linux/apparmor/default.nix
  41. +4 −4 pkgs/os-specific/linux/iproute/default.nix
  42. +3 −2 pkgs/os-specific/linux/libcap/default.nix
  43. +75 −31 pkgs/os-specific/linux/systemd/default.nix
  44. +3 −1 pkgs/servers/sql/postgresql/default.nix
  45. +117 −0 pkgs/servers/sql/postgresql/patches/stabilize-timetz-dst.patch
  46. +18 −18 pkgs/servers/x11/xorg/default.nix
  47. +0 −7 pkgs/servers/x11/xorg/overrides.nix
  48. +6 −6 pkgs/servers/x11/xorg/tarballs.list
  49. +2 −2 pkgs/shells/bash/bash-completion/default.nix
  50. +1 −4 pkgs/stdenv/darwin/default.nix
  51. +2 −0 pkgs/test/default.nix
  52. +125 −0 pkgs/test/install-shell-files/default.nix
  53. +10 −3 pkgs/tools/compression/brotli/default.nix
  54. +0 −52 pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch
  55. +0 −51 pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch
  56. +0 −1,153 pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch
  57. +4 −9 pkgs/tools/misc/coreutils/default.nix
  58. +100 −0 pkgs/tools/misc/coreutils/sys-getdents-undeclared.patch
  59. +2 −2 pkgs/tools/networking/curl/default.nix
  60. +2 −2 pkgs/tools/networking/unbound/default.nix
  61. +36 −0 pkgs/tools/system/hostctl/default.nix
  62. +29 −10 pkgs/top-level/all-packages.nix
  63. +23 −3 pkgs/top-level/haskell-packages.nix
  64. +1 −1 pkgs/top-level/python-packages.nix
7 changes: 6 additions & 1 deletion doc/stdenv/stdenv.xml
Original file line number Diff line number Diff line change
@@ -2070,7 +2070,7 @@ nativeBuildInputs = [ breakpointHook ];
The <literal>installManPage</literal> function takes one or more paths to manpages to install. The manpages must have a section suffix, and may optionally be compressed (with <literal>.gz</literal> suffix). This function will place them into the correct directory.
</para>
<para>
The <literal>installShellCompletion</literal> function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of <literal>--bash</literal>, <literal>--fish</literal>, or <literal>--zsh</literal>. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag <literal>--name NAME</literal> before the path. If this flag is not provided, zsh completions will be renamed automatically such that <literal>foobar.zsh</literal> becomes <literal>_foobar</literal>.
The <literal>installShellCompletion</literal> function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of <literal>--bash</literal>, <literal>--fish</literal>, or <literal>--zsh</literal>. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag <literal>--name NAME</literal> before the path. If this flag is not provided, zsh completions will be renamed automatically such that <literal>foobar.zsh</literal> becomes <literal>_foobar</literal>. A root name may be provided for all paths using the flag <literal>--cmd NAME</literal>; this synthesizes the appropriate name depending on the shell (e.g. <literal>--cmd foo</literal> will synthesize the name <literal>foo.bash</literal> for bash and <literal>_foo</literal> for zsh). The path may also be a fifo or named fd (such as produced by <literal>&lt;(cmd)</literal>), in which case the shell and name must be provided.
<programlisting>
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
@@ -2081,6 +2081,11 @@ postInstall = ''
installShellCompletion --zsh --name _foobar share/completions.zsh
# implicit behavior
installShellCompletion share/completions/foobar.{bash,fish,zsh}
# using named fd
installShellCompletion --cmd foobar \
--bash &lt;($out/bin/foobar --bash-completion) \
--fish &lt;($out/bin/foobar --fish-completion) \
--zsh &lt;($out/bin/foobar --zsh-completion)
'';
</programlisting>
</para>
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport;

let
version = "2.28.0";
version = "2.29.0";
svn = subversionClient.override { perlBindings = perlSupport; };

gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
@@ -34,7 +34,7 @@ stdenv.mkDerivation {

src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "17a311vzimqn1glc9d7x82rhb1mb81m5rr4g8xji8idaafid39fz";
sha256 = "KEMtmVJXxGJv4PsgkfWI327tmOlXFBnnLIO8Izcua4k=";
};

outputs = [ "out" ] ++ stdenv.lib.optional withManual "doc";
12 changes: 10 additions & 2 deletions pkgs/build-support/install-shell-files/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{ makeSetupHook }:
{ makeSetupHook, tests }:

# See the header comment in ../setup-hooks/install-shell-files.sh for example usage.
makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh
let
setupHook = makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh;
in

setupHook.overrideAttrs (oldAttrs: {
passthru = (oldAttrs.passthru or {}) // {
tests = tests.install-shell-files;
};
})
125 changes: 95 additions & 30 deletions pkgs/build-support/setup-hooks/install-shell-files.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# shellcheck shell=bash
# Setup hook for the `installShellFiles` package.
#
# Example usage in a derivation:
@@ -19,8 +19,8 @@
# installManPage <path> [...<path>]
#
# Each argument is checked for its man section suffix and installed into the appropriate
# share/man<n>/ directory. The function returns an error if any paths don't have the man section
# suffix (with optional .gz compression).
# share/man/man<n>/ directory. The function returns an error if any paths don't have the man
# section suffix (with optional .gz compression).
installManPage() {
local path
for path in "$@"; do
@@ -49,7 +49,7 @@ installManPage() {
done
}

# installShellCompletion [--bash|--fish|--zsh] ([--name <name>] <path>)...
# installShellCompletion [--cmd <name>] ([--bash|--fish|--zsh] [--name <name>] <path>)...
#
# Each path is installed into the appropriate directory for shell completions for the given shell.
# If one of `--bash`, `--fish`, or `--zsh` is given the path is assumed to belong to that shell.
@@ -61,9 +61,20 @@ installManPage() {
# If the shell completion needs to be renamed before installing the optional `--name <name>` flag
# may be given. Any name provided with this flag only applies to the next path.
#
# If all shell completions need to be renamed before installing the optional `--cmd <name>` flag
# may be given. This will synthesize a name for each file, unless overridden with an explicit
# `--name` flag. For example, `--cmd foobar` will synthesize the name `_foobar` for zsh and
# `foobar.bash` for bash.
#
# For zsh completions, if the `--name` flag is not given, the path will be automatically renamed
# such that `foobar.zsh` becomes `_foobar`.
#
# A path may be a named fd, such as produced by the bash construct `<(cmd)`. When using a named fd,
# the shell type flag must be provided, and either the `--name` or `--cmd` flag must be provided.
# This might look something like:
#
# installShellCompletion --zsh --name _foobar <($out/bin/foobar --zsh-completion)
#
# This command accepts multiple shell flags in conjunction with multiple paths if you wish to
# install them all in one command:
#
@@ -76,9 +87,16 @@ installManPage() {
# installShellCompletion --fish --name foobar.fish share/completions.fish
# installShellCompletion --zsh --name _foobar share/completions.zsh
#
# Or to use shell newline escaping to split a single invocation across multiple lines:
#
# installShellCompletion --cmd foobar \
# --bash <($out/bin/foobar --bash-completion) \
# --fish <($out/bin/foobar --fish-completion) \
# --zsh <($out/bin/foobar --zsh-completion)
#
# If any argument is `--` the remaining arguments will be treated as paths.
installShellCompletion() {
local shell='' name='' retval=0 parseArgs=1 arg
local shell='' name='' cmdname='' retval=0 parseArgs=1 arg
while { arg=$1; shift; }; do
# Parse arguments
if (( parseArgs )); then
@@ -97,6 +115,17 @@ installShellCompletion() {
# treat `--name=foo` the same as `--name foo`
name=${arg#--name=}
continue;;
--cmd)
cmdname=$1
shift || {
echo 'installShellCompletion: error: --cmd flag expected an argument' >&2
return 1
}
continue;;
--cmd=*)
# treat `--cmd=foo` the same as `--cmd foo`
cmdname=${arg#--cmd=}
continue;;
--?*)
echo "installShellCompletion: warning: unknown flag ${arg%%=*}" >&2
retval=2
@@ -110,39 +139,67 @@ installShellCompletion() {
if (( "${NIX_DEBUG:-0}" >= 1 )); then
echo "installShellCompletion: installing $arg${name:+ as $name}"
fi
# if we get here, this is a path
# Identify shell
local basename
basename=$(stripHash "$arg")
# if we get here, this is a path or named pipe
# Identify shell and output name
local curShell=$shell
if [[ -z "$curShell" ]]; then
# auto-detect the shell
case "$basename" in
?*.bash) curShell=bash;;
?*.fish) curShell=fish;;
?*.zsh) curShell=zsh;;
local outName=''
if [[ -z "$arg" ]]; then
echo "installShellCompletion: error: empty path is not allowed" >&2
return 1
elif [[ -p "$arg" ]]; then
# this is a named fd or fifo
if [[ -z "$curShell" ]]; then
echo "installShellCompletion: error: named pipe requires one of --bash, --fish, or --zsh" >&2
return 1
elif [[ -z "$name" && -z "$cmdname" ]]; then
echo "installShellCompletion: error: named pipe requires one of --cmd or --name" >&2
return 1
fi
else
# this is a path
local argbase
argbase=$(stripHash "$arg")
if [[ -z "$curShell" ]]; then
# auto-detect the shell
case "$argbase" in
?*.bash) curShell=bash;;
?*.fish) curShell=fish;;
?*.zsh) curShell=zsh;;
*)
if [[ "$argbase" = _* && "$argbase" != *.* ]]; then
# probably zsh
echo "installShellCompletion: warning: assuming path \`$arg' is zsh; please specify with --zsh" >&2
curShell=zsh
else
echo "installShellCompletion: warning: unknown shell for path: $arg" >&2
retval=2
continue
fi;;
esac
fi
outName=$argbase
fi
# Identify output path
if [[ -n "$name" ]]; then
outName=$name
elif [[ -n "$cmdname" ]]; then
case "$curShell" in
bash|fish) outName=$cmdname.$curShell;;
zsh) outName=_$cmdname;;
*)
if [[ "$basename" = _* && "$basename" != *.* ]]; then
# probably zsh
echo "installShellCompletion: warning: assuming path \`$arg' is zsh; please specify with --zsh" >&2
curShell=zsh
else
echo "installShellCompletion: warning: unknown shell for path: $arg" >&2
retval=2
continue
fi;;
# Our list of shells is out of sync with the flags we accept or extensions we detect.
echo 'installShellCompletion: internal error' >&2
return 1;;
esac
fi
# Identify output path
local outName sharePath
outName=${name:-$basename}
local sharePath
case "$curShell" in
bash) sharePath=bash-completion/completions;;
fish) sharePath=fish/vendor_completions.d;;
zsh)
sharePath=zsh/site-functions
# only apply automatic renaming if we didn't have a manual rename
if test -z "$name"; then
if [[ -z "$name" && -z "$cmdname" ]]; then
# convert a name like `foo.zsh` into `_foo`
outName=${outName%.zsh}
outName=_${outName#_}
@@ -153,8 +210,16 @@ installShellCompletion() {
return 1;;
esac
# Install file
install -Dm644 -T "$arg" "${!outputBin:?}/share/$sharePath/$outName" || return
# Clear the name, it only applies to one path
local outDir="${!outputBin:?}/share/$sharePath"
local outPath="$outDir/$outName"
if [[ -p "$arg" ]]; then
# install handles named pipes on NixOS but not on macOS
mkdir -p "$outDir" \
&& cat "$arg" > "$outPath"
else
install -Dm644 -T "$arg" "$outPath"
fi || return
# Clear the per-path flags
name=
done
if [[ -n "$name" ]]; then
6 changes: 3 additions & 3 deletions pkgs/data/misc/tzdata/default.nix
Original file line number Diff line number Diff line change
@@ -2,16 +2,16 @@

stdenv.mkDerivation rec {
pname = "tzdata";
version = "2019c";
version = "2020c";

srcs =
[ (fetchurl {
url = "https://data.iana.org/time-zones/releases/tzdata${version}.tar.gz";
sha256 = "0z7w1yv37cfk8yhix2cillam091vgp1j4g8fv84261q9mdnq1ivr";
sha256 = "1nab36g5ibs88wg2mzpzygi1wh5gh2al1qjvbk8sb90sbw8ar43q";
})
(fetchurl {
url = "https://data.iana.org/time-zones/releases/tzcode${version}.tar.gz";
sha256 = "1m3y2rnf1nggxxhxplab5zdd5whvar3ijyrv7lifvm82irkd7szn";
sha256 = "1r5zrk1k3jhhilkhrx82fd19rvysji8jk05gq5v0rndmyx07zacs";
})
];

7 changes: 6 additions & 1 deletion pkgs/development/compilers/gcc/builder.sh
Original file line number Diff line number Diff line change
@@ -287,7 +287,12 @@ postInstall() {
done

# Two identical man pages are shipped (moving and compressing is done later)
ln -sf gcc.1 "$out"/share/man/man1/g++.1
for i in "$out"/share/man/man1/*g++.1; do
if test -e "$i"; then
man_prefix=`echo "$i" | sed "s,.*/\(.*\)g++.1,\1,"`
ln -sf "$man_prefix"gcc.1 "$i"
fi
done
}

genericBuild
75 changes: 64 additions & 11 deletions pkgs/development/compilers/ghc/8.10.2-binary.nix
Original file line number Diff line number Diff line change
@@ -2,6 +2,14 @@
, fetchurl, perl, gcc
, ncurses6, gmp, glibc, libiconv, numactl
, llvmPackages

# minimal = true; will remove files that aren't strictly necessary for
# 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
}:

# Prebuilt only does native
@@ -82,7 +90,6 @@ stdenv.mkDerivation rec {
patchShebangs ghc-${version}/utils/
patchShebangs ghc-${version}/configure
'' +

# We have to patch the GMP paths for the integer-gmp package.
''
find . -name integer-gmp.buildinfo \
@@ -91,6 +98,12 @@ stdenv.mkDerivation rec {
find . -name base.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
'' +
# aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
# FFI_LIB_DIR is a good indication of places it must be needed.
stdenv.lib.optionalString stdenv.hostPlatform.isAarch64 ''
find . -name package.conf.in \
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
'' +
# Rename needed libraries and binaries, fix interpreter
stdenv.lib.optionalString stdenv.isLinux ''
find . -type f -perm -0100 -exec patchelf \
@@ -128,14 +141,35 @@ stdenv.mkDerivation rec {

# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
postFixup = stdenv.lib.optionalString stdenv.isLinux ''
for p in $(find "$out" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
fi
done
'' + stdenv.lib.optionalString stdenv.isDarwin ''
postFixup = stdenv.lib.optionalString stdenv.isLinux
(if stdenv.hostPlatform.isAarch64 then
# Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs
# are 2 directories deep from $out/lib, so pooling symlinks there makes
# a short rpath.
''
(cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6)
(cd $out/lib; ln -s ${gmp.out}/lib/libgmp.so.10)
(cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1)
for p in $(find "$out/lib" -type f -name "*\.so*"); do
(cd $out/lib; ln -s $p)
done
for p in $(find "$out/lib" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p
fi
done
''
else
''
for p in $(find "$out" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
fi
done
'') + stdenv.lib.optionalString stdenv.isDarwin ''
# not enough room in the object files for the full path to libiconv :(
for exe in $(find "$out" -type f -executable); do
isScript $exe && continue
@@ -146,6 +180,13 @@ stdenv.mkDerivation rec {
for file in $(find "$out" -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
'' +
stdenv.lib.optionalString minimal ''
# Remove profiling objects
find $out -type f -name '*.p_o' -delete
rm $out/lib/ghc-*/bin/ghc-iserv-prof
# Remove docs
rm -r $out/share/{doc,man}
'';

doInstallCheck = true;
@@ -169,6 +210,18 @@ stdenv.mkDerivation rec {
enableShared = true;
};

meta.license = stdenv.lib.licenses.bsd3;
meta.platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
meta = let
platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
in {
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;
maintainers = with stdenv.lib.maintainers; [ lostnet ];
};
}
Loading