Commit Graph

994 Commits

Author SHA1 Message Date
Alexandre Esteves
e7c9cf24a8 haskell.compiler.ghc8107: don't use libffi 3.3 on aarch64-darwin 2024-07-13 01:21:28 +01:00
sternenseemann
aadfe3ef2b haskell.compiler.ghc966: init at 9.6.6
https://www.haskell.org/ghc//blog/20240701-ghc-9.6.6-released.html
2024-07-08 12:29:42 +02:00
doyougnu
93d765be7e haskell.compiler.ghc8107: use libffi 3.3
This is the libffi version that GHC 8.10.7 was released with.
libffi >= 3.4 in nixpkgs is no longer getting configured with the
configure flag that enabled GHC to continue working.
See https://gitlab.haskell.org/ghc/ghc/-/issues/20051.

Fixes #324384.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2024-07-08 12:28:40 +02:00
sternenseemann
8ebd50f67a haskell.compiler.*: calculate tool path using common function
This refactor should simplify the code a little bit and make future
changes easier. I. e. for cross compiling GHC we'll have to update the
tools in the GHC settings file and calculate the host->target tool paths
for later use. Having a ready function for this will make this a lot
easier.
2024-06-13 00:06:49 +02:00
sternenseemann
702d636d78 haskell.compiler.ghc948: fix expression file name
This is a left over to do from #308776. Rebasing existing PR (prior
to #308776) would need to be rebased on a change before the commit
included in this PR.
2024-06-13 00:00:53 +02:00
github-actions[bot]
51bd20f7c4
Merge master into haskell-updates 2024-06-10 00:14:27 +00:00
Alexis Hildebrandt
f8c4a98e8e treewide: Remove the definite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"([Tt]he)? ' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Tt]he (.)/\1\U\2/'
2024-06-09 23:08:46 +02:00
Tom Sydney Kerckhove
6457cf0c01 haskell.compiler.ghc96: hadrian patch fix for fully_static 2024-06-08 22:10:06 +02:00
sternenseemann
fc1e8093b5 haskell.packages.ghc910: work around aarch64-darwin output cycles
This ports our infamous patch for Cabal that prevents certain parts of
the Paths_* module from being generated in order to prevent unnecessary
references on aarch64-darwin, to GHC >= 9.10.

See also:

- Original issues: #140774
- Patches
  - Original patch for GHC >= 8.10 && < 9.2 / Cabal >= 3.2 && < 3.6:
    https://github.com/nixOS/nixpkgs/commit/b0dcd7fa34377fc0c5ff155de2d07ffbff3
  - Patch for GHC >= 9.2 && < 9.10 / Cabal >= 3.6 && < 3.12: #216857,
    https://github.com/NixOS/nixpkgs/pull/240387/commits/f6f780f129f50df536fb30,
    …
2024-05-31 21:23:09 +02:00
sternenseemann
69bdf62eb6 haskell.compiler.ghc9{6,8}: fix elfutils splicing
elfutils is used in the RTS (rts/Libdw.c), i.e. it will be used on the
target platform.

Tested via pkgsCross.gnu32.haskellPackages.ghc [1], though #304605 needs
to be cherry-picked for elfutils to build.

[1]: nix-shell -E 'with import ./. { crossSystem = "i686-linux"; };
       mkShell { nativeBuildInputs = [haskellPackages.ghc ]; }'
2024-05-26 21:29:11 +02:00
github-actions[bot]
edc6c261ab
Merge master into haskell-updates 2024-05-25 00:13:23 +00:00
Sigmanificient
203a48ad35 pkgs/development: remove unused fetchpatch arguments 2024-05-24 02:53:57 +02:00
sternenseemann
131d97df5c haskell.compiler: simplify whitespace for make/native-bignum GHCs
Conditional whitespace was only necessary to prevent rebuilds. We can
now revert this since it doesn't make a functional difference.
2024-05-20 20:30:12 +02:00
sternenseemann
ea9498a08d haskell.compiler: simplify patch logic for make/native-bignum GHCs
This only reorders the patches in some cases, as can be seen by
comparing the patch lists using before and after this change:

 ghc902:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/cixlb1974spszv897qklibd6avlwk8ic-ghc-9.0.2-fcompact-unwind.patch
 ghc925:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
 ghc926:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
 ghc927:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
 ghc928:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
 ghc945:
-  * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-ghc946:
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
+ghc946:
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
+  * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
   * /nix/store/grgg5qjcwj5n8dyp50z4gwfd9vig09px-9.4.6-bytestring-posix-source.patch
 ghc947:
-  * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-ghc948:
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
+ghc948:
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
+  * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
2024-05-20 20:30:05 +02:00
sternenseemann
131400c2e2 haskell.compiler: port all make/native-bignum GHCs to common expr
The common expression is a little messy to avoid rebuilds. It can be
cleaned up in a second step.

`9.4.8.fixme.nix` is used temporarily so that git's rename detection
gets where common-make-native-bignum.nix is coming from.

8.10.7 keeps its expression since it uses integer-simple which changes
the expression's interface. This is unfortunately very annoying to
reflect in a common expression.
2024-05-16 15:47:56 +02:00
Vaibhav Sagar
640cf550ee haskell.compiler.ghc910: init at 9.10.1
https://www.haskell.org/ghc/blog/20240510-ghc-9.10.1-released.html
2024-05-13 12:22:46 +02:00
sternenseemann
c93aff17d5 haskell.compiler.ghc9{6,8}: apply hadrian patches to shared ghcSrc
This makes the hadrian expressions much simpler as we no longer need to
thread through extra arguments for special workarounds.
common-hadrian.nix decides in one place which patches we need and
directly applies them to the source used to build everything.
2024-04-27 15:03:02 +02:00
sternenseemann
675bcbb917 haskell.compiler.ghc9{6,8}: pass patched source to hadrian
We'll want to (slowly) unify the source used by the different
derivations we use to build GHC. As a first step, use the same base
source for building GHC and all hadrian related packages. This is
achieved by wrapping the fetcher result in `srcOnly` to apply GHC
patches immediately.

To modify the patches (and source) used by GHC we now have a changed
overriding interface for >= 9.6:

```
oldGhc.override {
  ghcSrc = oldGhc.src.overrideAttrs (oldAttrs: {
    src = …;
    patches = …;
  });
}
```
2024-04-27 15:03:02 +02:00
Alex Tunstall
bf2a10e15b haskell.compiler.ghc8107: support {LD,AR}_STAGE0 2024-04-18 21:11:02 +02:00
sternenseemann
1dc7345389 haskell.compiler.ghc981: build stage 2 compiler for “native cross”
When we are building compiler for a platform we can execute ourselves,
we can build a proper stage2 compiler which unlocks some features that
are interesting for e.g. pkgsStatic.

The resulting compiler is technically a native compiler that's prefixed.
2024-04-16 22:16:19 +02:00
sternenseemann
179f8e0aa4 haskell.compiler.ghc965: init at 9.6.5
https://www.haskell.org/ghc/blog/20240416-ghc-9.6.5-released.html
2024-04-16 20:07:28 +02:00
Marc Scholten
07c5d2d3f9 haskell.compiler.ghcHEAD: 9.11.20240323 -> 9.11.20240410 2024-04-11 21:15:53 +02:00
sternenseemann
91a91b9ae4 haskell.compiler.ghcHEAD: fix hash mismatch on case insensitive fs
By trying to migitate the conflict between two files on a case
insensitive fs, we will inevitably end up with a different hash than on
case sensitive filesystems. To work around this, we just delete the
directory that contains the offending files — luckily it is not
important to the build of GHC.
2024-04-10 00:29:58 +02:00
Slava Gorbunov
867727144e pkgsCross.ghcjs.ghc: make EM_CACHE absolute
emscripten-3.1.51 fails to compile code (with cache locking problems) if
EM_CACHE is relative.
2024-04-09 22:18:56 +02:00
sternenseemann
c774347c25 haskell.compiler.ghcHEAD: 9.9.20231121 -> 9.11.20240323
Adds a new core package `os-string`.
2024-03-23 15:45:14 +01:00
sternenseemann
ccc08ba453 haskell.compiler.{ghc98*,ghcHEAD}: bootstrap using source built 9.6
Unfortunately, we are running into trouble linking dependencies of
hadrian against the libraries of the clock package with 9.6.3 and
9.6.4 _bindists_. My current suspiscion is that this is caused by
some kind of discrepancy between the toolchain used by GHC upstream
and us that persists from the configure step used when building the
bindist. The problem seems to be somewhat localized to hsc2hs (hence
clock is an issue), with GHC 9.6.4 bindists even passing a flag to
ld that is not supported by our version of cctools.

The problem is not fully diagnosed, so take the speculation above
with a grain of salt.

As a workaround, we can use the source built GHC 9.6 which is, of
course, configured with our toolchain in the environment.
2024-03-21 21:00:12 +01:00
Wolfgang Walther
f4f56c7af2
haskell.compiler: no dynamic way without enableShared/enableProfiledLibs
This disables building dynamic libraries for GHC 9.4.x and before, when enableShared and
enableProfiledLibs are set to false. Currently this only disables dynamic linking of GHC
itself, but still creates dynamic libraries.

The hadrian-based GHC 9.6+ already disable building dynamic libraries via the no_dynamic_libs
transformer in this case.

The reason for this happening before was, that the default was assumed to be "v p dyn", of
which "p" was taken away when profiled libs were disabled. But this would unconditionally
enable the dyn way. Using the BUILD_PROF_LIBS flag in this case will let GHC's config.mk.in
script make the proper decisions about which GhcLibWays to build.
2024-02-26 13:23:26 +01:00
Peter Simons
27567240ea ghc: add new compiler version 9.8.2 2024-02-26 10:37:33 +01:00
github-actions[bot]
acd0181532
Merge master into haskell-updates 2024-01-26 00:12:48 +00:00
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
Vladimír Čunát
3f23d91f84
Merge branch 'master' into haskell-updates 2024-01-25 15:03:20 +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
sternenseemann
b53d8e6cdb haskell.compiler.ghc964: init at 9.6.4
https://www.haskell.org/ghc/blog/20240109-ghc-9.6.4-released.html

Not updating the default GHC version yet to prevent a huge rebuild.
2024-01-18 14:21:23 +01:00
Paul Meyer
ac7903b5c4 ghc: remove unreferenced patches 2024-01-14 15:11:37 +01:00
sternenseemann
245035ea35 Merge remote-tracking branch 'origin/master' into haskell-updates 2024-01-12 16:55:57 +01:00
sternenseemann
80c10db7bc haskell.compiler.ghc963Binary: only install_name_tool mach-o exes
Testing for isScript was flawed, as 9.6.3 started having bash
completions in their tarball which don't have a shebang (which is used
by isScript to detect a shell script).
2024-01-12 01:23:50 +01:00
sternenseemann
f805a39448 pkgsStatic.haskell.packages.ghc96.ghc: mark broken
Reference https://github.com/NixOS/nixpkgs/issues/208959
2024-01-11 14:14:56 +01:00
sternenseemann
edebca765c haskell.compiler.ghc963Binary: init at 9.6.3
Best reviewed by viewing

    diff -u pkgs/development/compilers/ghc/9.{2.4,6.3}-binary.nix

main change are that we drop the `isHadrian` mechanism, since all
bindists are produced by hadrian and alpine bindists are also available
dynamically linked now.
2024-01-07 13:48:41 +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