Commit Graph

959 Commits

Author SHA1 Message Date
sternenseemann
65fc44c341 haskell.compiler.ghc8102Binary: remove at 8.10.2
Since 46f14d30aa, it no longer has any
users in nixpkgs.
2024-01-25 15:20:35 +01:00
Naïm Favier
6d11e88fed
Merge pull request #280945 from katexochen/treewide/unref-patches
treewide: cleanup unreferenced patch files
2024-01-25 12:42:50 +01:00
sternenseemann
0e756e65d5 haskell.compiler.ghc96: 9.6.3 -> 9.6.4
https://www.haskell.org/ghc/blog/20240109-ghc-9.6.4-released.html

Co-authored-by: Ben Gamari <ben@smart-cactus.org>
2024-01-23 21:05:01 +01:00
Paul Meyer
ac7903b5c4 ghc: remove unreferenced patches 2024-01-14 15:11:37 +01:00
K900
887e96e875 Merge remote-tracking branch 'origin/master' into staging-next 2024-01-02 10:55:23 +03:00
maralorn
09f447abd2 Merge branch 'ghc-remove-without-lts' into haskell-updates 2024-01-01 14:28:45 +01:00
maralorn
a7baccff6f Merge branch 'master' into haskell-updates 2024-01-01 14:25:26 +01:00
maralorn
0bd0847ecd
Merge pull request #275616 from sternenseemann/ghc-cross-docs
haskell.compiler: also build manual for cross-compilers
2024-01-01 14:22:20 +01:00
Dylan Simon
1d204f9758 haskell.compiler.ghc*Binary: add missing #! patch
inplace/bin/mkdirhier needs #!/bin/sh patched
2023-12-24 14:39:59 +01:00
sternenseemann
7998143a43 haskell.compiler: also build manual for cross-compilers
The reasoning given for disabling it is flawed: In most cases, sphinx
and its dependencies are already in the binary cache, since we only need
them as build tools—sphinx for the build platform is just the normal
pkgs.sphinx, since it doesn't care about targetPlatform.

We just need to disable it when the buildPlatform is also musl, so we
avoid pulling in sphinx in pkgsMusl.
2023-12-20 14:12:32 +01:00
sternenseemann
9067af4fb4 haskell.compiler: drop all ghcs without an stackage LTS snapshot
https://www.stackage.org/ lists the latest LTS snapshot for any GHC
version which, on the flipside, lets us discover which versions don't
have a corresponding LTS snapshot. There is really no reason to keep
around GHCs that only appeared in some nightly snapshot way back.

haskell.compiler.ghc924: remove at 9.2.4
haskell.compiler.ghc942: remove at 9.4.2
haskell.compiler.ghc943: remove at 9.4.3
haskell.compiler.ghc944: remove at 9.4.4
haskell.compiler.ghc962: remove at 9.6.2
2023-12-20 12:09:06 +01:00
sternenseemann
ce5cbc4465 haskell.packages.{ghc96,ghc98}: disable haddock for cross
In this situation, haddock would not be built by hadrian, as there is no
stage0:exe:haddock target by default. (We should eventually try adding
one.) If haddock is enabled and the build->host haddock missing, Cabal
tries using the build->build haddock which may fail to load the
documentation from the interface files produced by the build->host
GHC (e.g. due to a mismatch between dynamic and static linking).

Add regression tests to haskell-updates jobset.

Resolves #275304.
2023-12-20 11:09:45 +01:00
Marc Scholten
54fc9f6356 haskell.packages.ghc9{6,8}: work around aarch64-darwin output cycles
This ports our infamous patch for `Cabal` which cheesily prevents an
output cycle for derivations that use separate bin outputs where
references caused by the `Paths_*` module can't be eliminated by the GHC
aarch64-darwin codegen backend.

See also

- the original issue #140774,
- the original patch for GHC 9.2 #216857
- the ported patch for GHC 9.4
  f6f780f129

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2023-12-13 00:16:18 +01:00
sternenseemann
274c1f0970 haskell.compiler.ghc865Binary: don't pass llvmPackages_6
We want to remove llvmPackages_6, but it is the only version GHC 8.6.5
supports. Luckily, we actually don't need LLVM in any case, since all
X86 architectures have native codegen for Darwin and Linux, as well as
POWER for Linux. Consequently, we can just pass `null` and add an extra
assert to make this more transparent to future tinkerers.
2023-12-04 19:43:07 +01:00
sternenseemann
bd151aad5b haskell.compiler.ghc865Binary: correct useLLVM condition
GHC has a native backend for POWER and SPARC. This is relevant to 8.6.5
binary in the case of POWER where we actually have a bindist and don't
need to include LLVM.
2023-12-04 19:43:07 +01:00
sternenseemann
ea7faf9d9e haskell.compiler.ghc865Binary: clean up unused aarch64-linux src
GHC 8.6.5 binary is essentially broken on aarch64-linux, hence the
platform has been removed from meta in the past. We can also drop the
corresponding src data to lessen confusion.
2023-12-04 19:43:07 +01:00
sternenseemann
46f14d30aa haskell.compiler.ghc884: remove at 8.8.4
The main aim of this is to be able to drop llvmPackages_7.
2023-12-04 19:42:44 +01:00
sternenseemann
030580776a haskell.compiler.ghcHEAD: 9.9.20231014 -> 9.9.20231121 2023-11-22 15:48:01 +01:00
Claudio Bley
2af613b58c haskell.compiler.ghc*: set abs paths for cctools bintools w/ hadrian
Fixes #267250.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2023-11-21 18:19:27 +01:00
sternenseemann
d48d90ed8a haskellPackages.ghc: 9.4.7 -> 9.4.8
haskell.compiler.ghc94: 9.4.7 -> 9.4.8
haskell.compiler.ghc948: init at 9.4.8

https://www.haskell.org/ghc/blog/20231110-ghc-9.4.8-released.html
2023-11-17 12:52:04 +01:00
sternenseemann
2fd7fa6fbe haskell.compiler: link upstream issue for sphinx 7 patch 2023-11-17 12:52:04 +01:00
Alyssa Ross
afabc4a15d
Merge remote-tracking branch 'origin/master' into HEAD
Conflicts:
	pkgs/development/libraries/SDL2/default.nix
2023-11-10 15:18:19 +01:00
sternenseemann
2ec6f63534 haskell.compiler.ghcHEAD: 9.7.20230527 -> 9.9.20231014 2023-11-06 15:26:58 +01:00
Vladimír Čunát
176ccbcda8
ghc*: patch build of docs after sphinx update
The 8.x versions don't seem to need this (and the patch wouldn't apply).
2023-10-28 12:50:03 +02:00
maralorn
fe8322686d
Merge pull request #260410 from ncfavier/ghc-fix-glob
haskell.compiler.ghc*Binary: fix globbing
2023-10-22 02:57:51 +02:00
Naïm Favier
082a03e152
haskell.compiler.ghc*Binary: fix globbing 2023-10-15 15:00:54 +02:00
Vaibhav Sagar
a63c085661 haskell.compiler.ghc98: init at 9.8.1
https://www.haskell.org/ghc/blog/20231009-ghc-9.8.1-released.html

- Use source-built GHC 9.4.7, pending packaging of bindist.
- The aarch64-linux space saving strategy via disabling hyperlinked
  source is disabled for now, pending either an updated patch or
  an user defined flavour using
  https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10850.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2023-10-15 00:43:20 +02:00
maralorn
aa816d4958
Merge pull request #252362 from sternenseemann/ghc-9.4.7
haskellPackages.ghc: 9.4.6 -> 9.4.7
2023-10-04 22:24:01 +02:00
sternenseemann
59ee081663 haskell.compiler.*: don't unnecessarily include LLVM for GHC >= 9.2
When 9.2.1 was [released], I apparently was confused by the wording. The
NCG (-fasm) codegen backend for aarch64 not only works on
aarch64-darwin, but also aarch64-linux. `useLLVM` being enabled on
aarch64-linux had no adverse effect, as GHC used -fasm anyways, but it
did inflate closure size unnecessarily which we can rectify now.

[released]: https://www.haskell.org/ghc/blog/20211029-ghc-9.2.1-released.html
2023-10-04 20:17:17 +02:00
sternenseemann
32c1a8c383 haskellPackages.ghc: 9.4.6 -> 9.4.7
https://www.haskell.org/ghc/blog/20230825-ghc-9.4.7-released.html

Notice that useLLVM is disabled for all aarch64 platforms to match
2023-10-04 17:13:56 +02:00
Ryan Hendrickson
1d78ad9ea4 haskell.compiler.ghc96: 9.6.2 -> 9.6.3
https://www.haskell.org/ghc/blog/20230925-ghc-9.6.3-released.html
2023-09-28 15:28:23 +02:00
Samir Talwar
32db1fb6e0 ghc942 + ghc943: Apply the Cabal patch for --enable-relocatable
This patch was already applied to GHC 9.4.4 and up.

It should also fix the build, as the aarch64/darwin separate output fix depends upon it.
2023-08-10 01:17:27 +02:00
sternenseemann
0a96f3ee25 haskell.compiler.ghc946: init at 9.4.6
https://www.haskell.org/ghc/blog/20230807-ghc-9.4.6-released.html
2023-08-08 16:25:45 +02:00
Samir Talwar
f6f780f129 haskell.compiler.ghc94*: apply Cabal cycle patch on aarch64-darwin
This was already applied to GHC 9.2.x, but was not copied to GHC 9.4.x.
I have had issues with this locally.

The same patch works for both Cabal 3.6 and 3.8, so we can just reuse it.
2023-08-07 13:53:26 +02:00
github-actions[bot]
e365e1db48
Merge master into haskell-updates 2023-08-06 00:13:20 +00:00
sternenseemann
bf388d5514 haskell.compiler.ghc*Binary: make sure meta can always be evaluated
The `meta` set of the binary GHCs is mostly independent of the used
bindist (except for `pname` which includes `variantSuffix`). Thus we
should make sure it can be evaluated even if no bindist is available for
the platform, i.e. evaluating `outPath` may cause an evaluation failure,
but `meta.platforms` not. Use case at present is to make
`lib.meta.availableOn` work everywhere for any GHC (the normal GHCs
inherit their platforms list from their respective boot compiler, at
least for now).

To fix this we need to make sure that shallowly evaluating `passthru`
doesn't force `binDistUsed`, since `mkDerivation` needs to merge
`passthru` into the resulting derivation attribute set, thus forcing the
attribute names of `passthru`. We can easily do this by accessing what
we want to learn from `ghcBinDists` manually and using `or` to fall back
to a sensible default.
2023-08-02 12:30:10 +02:00
github-actions[bot]
8ad2926229
Merge master into haskell-updates 2023-07-16 00:16:59 +00:00
Randy Eckenrode
6454fb1bc0
haskell.compiler.ghc962: fix build on Darwin after stdenv rework merge
The switch to cctools-llvm made several LLVM tools the default on
Darwin, which includes llvm-ar. GHC will try to use `-L` with `ar` when
it is `llvm-ar`, but that doesn’t work currently on Darwin.

See https://gitlab.haskell.org/ghc/ghc/-/issues/23188.
2023-07-14 10:51:29 -06:00
sternenseemann
1eddb04ac9 haskell.compiler.{ghc962,ghcHEAD}: no rendered src on aarch64-linux
This saves just enough space on aarch64-linux so that the hadrian built
GHCs are under the 3GB Hydra output limit:

| compiler | before     | after      | Δ          |
|----------|------------|------------|------------|
| ghc962   | 3241234736 | 2810740560 | -430494176 |
| ghcHEAD  | 3341288328 | 2902760872 | -438527456 |

The total output size can be calculated using (don't forget to use
aarch64-linux):

```
nix-build -A <compiler> | xargs nix path-info -s | awk '{ s += $2 }; END { print s }'
```
2023-07-10 23:14:54 +02:00
sternenseemann
20b0406a00 haskell.*.ghc*BinaryMinimal: remove
haskell.compiler.ghc8102BinaryMinimal: remove at 8.10.2
haskell.compiler.ghc8107BinaryMinimal: remove at 8.10.7
haskell.compiler.ghc924BinaryMinimal: remove at 9.2.4

On aarch64-linux the binary GHCs take up about 2.6GB (which compresses
pretty well on zfs as it turns out), so they are below the output limit
of Hydra. This allows us to drop the special casing of aarch platforms
in haskell-packages.nix. While we're at it, drop the minimal variants so
we don't unnecessarily build variants of the binary GHCs.
2023-07-04 15:29:40 +02:00
sternenseemann
8aeb0de93d haskell: re-enable profiling on aarch64
The main problem was GHC exceeding the Hydra output limit with profiling
libs on aarch64-linux which made us disable the feature. Nowadays the
limit is 3GB, the GHC output is a bit over 2GB, so easily under the
limit.

aarch64-darwin uses a different codegen backend and was never really
affected by the problem: Its output with profiling enabled is around
1.6GB.

Consequently we can enable profiling for all platforms again, as we have
no output size issues for those we build on Hydra.

Thanks to flokli for helping me track down these up to date numbers.
2023-07-04 15:29:40 +02:00
sternenseemann
cb7ccdccd7 Merge remote-tracking branch 'origin/master' into haskell-updates 2023-06-08 20:16:04 +02:00
Rebecca Turner
17d63282b2 haskell.compiler: allow overriding source with hadrian
Hadrian (the GHC build tool) is built separately from GHC. This means
that if `haskell.compiler.ghc961` is overridden to add patches, those
patches will _only_ be applied to the GHC portion of the build, and not
the Hadrian build. For example, backporting this patch to GHC 9.6.1
failed because the changes to `hadrian/` files were not reflected in the
Nix build:

5ed77deb1b

By lifting `src` and `hadrian` from variables defined in the function
body to parameters with default values, the `hadrian/` files can be
overridden using the `haskell.compiler.ghc961.override` function. For
example:

   self.haskell.compiler.ghc961.override {
     # The GHC 9.6 builder in nixpkgs first builds hadrian with the
     # source tree provided here and then uses the built hadrian to
     # build the rest of GHC. We need to make sure our patches get
     # included in this `src`, then, rather than modifying the tree in
     # the `patchPhase` or `postPatch` of the outer builder.
     src = self.applyPatches {
       src = let
         version = "9.6.1";
       in
         self.fetchurl {
           url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
           sha256 = "fe5ac909cb8bb087e235de97fa63aff47a8ae650efaa37a2140f4780e21f34cb";
         };

       patches = [
         # Enable response files for linker if supported
         (self.fetchpatch {
           url = "5ed77deb1b.patch";
           hash = "sha256-dvenK+EPTZJYXnyfKPdkvLp+zeUmsY9YrWpcGCzYStM=";
         })
       ];
     };
   }

Note that we do have to re-declare the `src` we want, but I'm not sure
of a good way to avoid this while also sharing one set of patches
between the GHC and Hadrian builds.
2023-06-08 20:11:52 +02:00
sternenseemann
f1ad505272 haskell.compiler.ghc961: remove at 9.6.1 2023-06-08 18:18:11 +02:00
sternenseemann
271e7a9d82 haskell.compiler.ghcHEAD: 9.7.20230505 -> 9.7.20230527 2023-06-08 18:17:07 +02:00
ners
a83735c6a2 haskell.compiler.ghc962: init at 9.6.2
https://www.haskell.org/ghc/blog/20230523-ghc-9.6.2-released.html
2023-05-30 13:35:14 +02:00
Dennis Gosnell
d7d6b1c445
haskell.compiler.ghc928: init at 9.2.8 2023-05-27 17:24:01 +09:00
Naïm Favier
9d30031014 haskell.compiler.ghcHEAD: 9.7.20230406 -> 9.7.20230505
04b80850...983ce558

Adds support for callbacks to the JS backend.
2023-05-09 18:16:07 +02:00
fetsorn
560123c482 ghc: fix typos
"depedendency" -> "dependency"
2023-05-08 20:12:24 +04:00
sternenseemann
2fe11e6fee haskell.compiler.ghc94: 9.4.4 -> 9.4.5
https://www.haskell.org/ghc/blog/20230418-ghc-9.4.5-released.html
2023-04-22 17:47:11 +02:00