Commit Graph

678082 Commits

Author SHA1 Message Date
Alex Tunstall
eeeeb555e2 tests.cross.sanity: Add GHC to catch regressions
This is to ensure that Haskell users on platforms that lack official
bindists still have a convenient means of getting GHC running natively.

In my admittedly somewhat limited testing on RISC-V, GHC 8.10.7 is able
to bootstrap native builds for 9.2.8 and 9.4.5. GHC 9.2.8 and 9.4.5 are
unable to bootstrap themselves and 9.6.2 when cross-compiled.

If you're looking at this commit to see whether you can safely upgrade
the compiler used here to remove 8.10, please try cross-compiling 9.0 or
later and then booting a native GHC with it.
2024-09-08 23:50:05 +02:00
Alex Tunstall
bd373f03a0 haskell.compiler.ghc*: use GHC from pkgsBuildBuild 2024-09-08 23:50:05 +02:00
Alex Tunstall
322bab8284 haskell.compiler.ghc*: allow all platforms
Propagating the supported platforms of the boot compiler doesn't make
much sense when unregistered cross-compilation is possible.
2024-09-08 23:50:05 +02:00
Alex Tunstall
d3bad45240 haskell.compiler.ghc*: assert cross is possible 2024-09-08 23:50:05 +02:00
Alex Tunstall
35d77dde97 haskell.compiler.ghc*: add enableUnregisterised 2024-09-08 23:50:05 +02:00
Alex Tunstall
f865044099 haskell.compiler.ghc*: don't cross-compile haddock 2024-09-08 23:50:05 +02:00
Alex Tunstall
884a76c5e6 haskell.compiler.ghc*: use host->target CC and tools in settings
GHC's build system assumes that the C compiler, tools etc. discovered
during configure can also be used at runtime. This means that the CC,
LD, AR etc. variables given at runtime are used to populate the settings
file which GHC uses to lookup the tools it needs.

The implicit assumption of this mechanism is that the build and runtime
environment of GHC are similar enough and PATH is used to find the
tools. I. e. if we set CC=clang, we wouldn't need to worry about this as
much. We, however, pass absolute paths which is useful since it allows
GHC to work outside of stdenv (as long as e. g. no FFI is involved).

Even so, until now, we didn't really have any problems stemming from
this, as we used pkgsBuildTarget to get everything we need. The
compiler we'd want to execute would in principle need to come
from pkgsHostTarget.

1. For native compilers, all package sets are the same since
   build == host == target.
2. For cross compilers build == host, so pkgsBuildTarget
   is practically the same as pkgsHostTarget.

When cross-compiling a native compiler, build != host, so we need to
actually ensure that GHC uses different tools at runtime compared to
bootstrapping. There is currently no intended way to achieve this, so we
use a custom tool to edit the settings file. An alternative would be to
patch the build system, but this would be difficult to maintain. We
could go down this route if there's interest from upstream to provide a
proper way to specify the runtime tools.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2024-09-08 23:50:05 +02:00
sternenseemann
bd331dc379 ghc-settings-edit: init at 0.1.0 2024-09-08 23:50:05 +02:00
Alex Tunstall
d5f666f593 haskell.compiler.ghc*: don't configure --host 2024-09-08 23:50:05 +02:00
Alex Tunstall
1261fe024f haskell.compiler.ghc*: fall back to host libs for “cross native” ghc
The goal of this commit is basically to eliminate the use of
targetPackages for finding libraries. Instead, we introduce a
`targetLibs` set that can be used instead. The libraries in there
philosophically come from targetPackages since they are used by the core
libs and will be linked against user code. However, when cross compiling
GHC it's always a native compiler, so we can and have to use
pkgsHostTarget (targetPackages would be empty). This is explained more
in the acccompanying comment.

An alternative to this approach is not to pass in the libraries
explicitly via `--with-*` flags and rely on cc-wrapper and splicing to
pick the correct library. This works well for ncurses and probably
merits testing for other libraries as well since it's very simple. It
would need to be verified, however, that configure doesn't discover the
“wrong” library and leaks it somewhere.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2024-09-08 23:50:05 +02:00
Alex Tunstall
4b00fbf163 haskell.compiler.ghc*: correctly account for ncurses in cross
1. Explicitly set WITH_TERMINFO. We usually match GHC's behavior well,
   but it is better to tie the Nix option to make explicitly.
   Unfortunately, the same is very complicated to achieve with
   hadrian (iirc).
2. Disable enableTerminfo if we are cross-compiling. This matches
   the behavior of GHC's build system, so we'll have to match it now.
   It also reduces the ncurses-related headache a bit.
3. Stop passing --with-curses* flags. Unfortunately, GHC does not
   account for the fact that different platforms need different ncurses
   libraries. This is somewhat migitated by the fact that ncurses is
   only ever needed for the build platform if we are cross compiling,
   but I seem to remember it leaking into the final GHC somehow.
   A more reliable alternative is relying on the cc/ld wrapper scripts,
   as they'll always pull out the correct ncurses out of the environment
   when GHC's build system passes -lcurses.
4. Unconditionally add ncurses to depsBuildBuild. Stage0 unconditionally
   builds terminfo (maybe the stage1 compiler needs it?), so we need to
   make sure that ncurses for the build platform is available.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2024-09-08 23:50:05 +02:00
Alex Tunstall
cd31b04413 haskell.compiler.ghc*: set stage 0 tools
This is easy in comparison since these tools won't end up in GHC's
settings nor need to be available at runtime, so we can use
the *_FOR_BUILD environment variables.

It is important to add buildCC to depsBuildBuild to engage the
stdenv/wrapper script machinery properly.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2024-09-08 23:50:05 +02:00
github-actions[bot]
08a9878b23
Merge master into haskell-updates 2024-09-08 00:17:15 +00:00
OTABI Tomoya
c888b7edb5
python312Packages.simplesat: 0.8.2 -> 0.9.0 (#339957) 2024-09-08 09:15:12 +09:00
OTABI Tomoya
8bcaf56aa3
python312Packages.asn1: 2.7.0 -> 2.7.1 (#340316) 2024-09-08 09:02:13 +09:00
Philip Taron
80bf97b8c0
libcCross: set to null rather than using assert in nonsense scenarios (#340331) 2024-09-07 16:59:31 -07:00
OTABI Tomoya
93961c5030
python312Packages.fastavro: 1.9.5 -> 1.9.7 (#339959) 2024-09-08 08:48:29 +09:00
Peder Bergebakken Sundt
fb78d95a04
SpiderOAK: update download url (#335098) 2024-09-08 01:46:51 +02:00
Martin Weinelt
9fbc08f5ad
microcode{Intel,Amd}: create aliases after rename (#340400) 2024-09-08 01:32:15 +02:00
Martin Weinelt
2e6956d32e
microcode{Intel,Amd}: create aliases after rename
Fixes: #340379
Closes: #340398
2024-09-08 01:28:18 +02:00
Peder Bergebakken Sundt
abc717a263
python3Packages.numpy-groupies: remove with lib for meta (#335449) 2024-09-08 01:27:05 +02:00
Peder Bergebakken Sundt
7da67c754c
python312Packages.seabreeze: 2.6.0 -> 2.9.2 (#335470) 2024-09-08 01:25:08 +02:00
Peder Bergebakken Sundt
1b0f0ef925
pandoc-include: 1.3.3 -> 1.4.0 (#338521) 2024-09-08 01:13:10 +02:00
Peder Bergebakken Sundt
fe607df30a
wasm-pack: 0.12.1 -> 0.13.0 (#338513) 2024-09-08 01:12:04 +02:00
ajs124
193565cfe3
texstudio: 4.8.1 -> 4.8.2 (#338088) 2024-09-08 00:58:29 +02:00
Peder Bergebakken Sundt
68d785f283
libxnd: unstable-2019-08-01 -> 0.2.0-unstable-2023-11-17 (#337914) 2024-09-08 00:26:52 +02:00
Martin Weinelt
1ee459923c
Do a small rework of AMD and Intel microcode (#340379) 2024-09-08 00:21:18 +02:00
Peder Bergebakken Sundt
73b9ffd7a9
brainflow: 5.12.1 -> 5.13.2 (#338265) 2024-09-08 00:20:15 +02:00
Peder Bergebakken Sundt
4f57b85b58
colima: 0.7.0 -> 0.7.5 (#338473) 2024-09-08 00:18:09 +02:00
Doron Behar
43c41b03b5
splash: init at 3.10.3 (#336295) 2024-09-07 22:17:25 +00:00
lassulus
138a9180e0
remnote: 1.16.107 -> 1.16.111 (#340359) 2024-09-07 22:05:27 +01:00
Felix Singer
e6a1365cae iucode-tool: Move package file into by-name structure
Signed-off-by: Felix Singer <felixsinger@posteo.net>
2024-09-07 22:56:04 +02:00
Felix Singer
4108dbb113 microcodeIntel: Move package file into by-name structure
Signed-off-by: Felix Singer <felixsinger@posteo.net>
2024-09-07 22:56:04 +02:00
Felix Singer
e9184559d1 microcodeAmd: Move package file into by-name structure
Signed-off-by: Felix Singer <felixsinger@posteo.net>
2024-09-07 22:56:04 +02:00
Felix Singer
e8af0a82be microcode{Amd,Intel},iucode-tool: Format package files
Signed-off-by: Felix Singer <felixsinger@posteo.net>
2024-09-07 22:56:04 +02:00
Felix Singer
e8c405cdd2 microcode{Amd,Intel}: Limit platforms to x86 Linux
These firmware blobs are only applicable on x86 hardware. It doesn't
make sense to package them for other architectures, e.g. aarch64. Thus,
limit them to x86 Linux.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2024-09-07 22:56:04 +02:00
Johannes Jöns
8600a6306e
Discord updates (#340351) 2024-09-07 20:52:35 +00:00
maralorn
9e1b3019b4
haskellPackages.system-fileio: disable checks (#339341) 2024-09-07 22:50:44 +02:00
maralorn
adf1e11079
haskellPackages.diohsc: unbreak (#339302) 2024-09-07 22:44:43 +02:00
Johannes Jöns
24a60ea0c8
wavebox: 10.127.10-2 -> 10.128.5-2 (#328084) 2024-09-07 20:41:36 +00:00
Emily
544776c2e1
unifi7: mark insecure due to CVE-2024-42025 (#340341) 2024-09-07 21:33:36 +01:00
Finn Landweber
67a00dc8b4
haskellPackages: regenerate package set based on current config
This commit has been generated by maintainers/scripts/haskell/regenerate-hackage-packages.sh
2024-09-07 22:26:55 +02:00
Finn Landweber
e2af344be5
haskellPackages.system-fileio: disable checks 2024-09-07 22:26:55 +02:00
Martin Weinelt
696718aaab
python312Packages.django_5: 5.0.8 -> 5.1.1 (#339378) 2024-09-07 22:24:50 +02:00
Johannes Jöns
5690cd67f5
vencord: 1.9.5 -> 1.10.1 (#332423) 2024-09-07 20:20:59 +00:00
Thiago Kenji Okada
7f9021100c
osu-lazer{,-bin}: 2024.817.0 -> 2024.906.1 (#340125) 2024-09-07 21:17:13 +01:00
archer-65
64d90d8d24 rune-languageserver: 0.12.4 -> 0.13.4 2024-09-07 22:15:16 +02:00
Stig Palmquist
165cc70a30 ripasso-cursive: 0.6.4 -> 0.7.0 2024-09-07 22:14:24 +02:00
Martin Weinelt
df9f170cd5
python312Packages.psycopg-{c,pool}: expose attributes (#340367) 2024-09-07 22:11:38 +02:00
Donovan Glover
187fc8f66a
phosh: 0.41.0 -> 0.41.1 (#340152) 2024-09-07 20:07:21 +00:00