Commit Graph

24752 Commits

Author SHA1 Message Date
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
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
Wolfgang Walther
fc37487ab2 swiftpm: shellcheck setup hook 2024-09-08 22:06:41 +02:00
Wolfgang Walther
9df84d4c9a swiftpm: support structuredAttrs in setup hook
Currently no problematic package using multiple swiftpmFlags in nixpkgs
to test.
2024-09-08 22:06:41 +02:00
github-actions[bot]
5725a1eed6 Merge staging-next into staging 2024-09-08 18:04:33 +00:00
github-actions[bot]
3b1652aad3 Merge master into staging-next 2024-09-08 18:04:04 +00:00
R. Ryantm
2edf78a1ab erg: 0.6.42 -> 0.6.43 2024-09-08 00:54:45 +00:00
github-actions[bot]
5310eaa51e Merge staging-next into staging 2024-09-07 18:04:28 +00:00
github-actions[bot]
5a5ebe5a1c Merge master into staging-next 2024-09-07 18:04:01 +00:00
Philip Taron
4160ccc634 treewide: handle *Phases variables __structuredAttrs-agnostically (#339117) 2024-09-07 09:17:57 -07:00
Artturin
d1f2bc2931 llvmPackages_git.compiler-rt: disable building ctx_profile when build sanitizers are disabled (#332918) 2024-09-07 17:42:49 +03:00
Maren van Otterdijk
f6c7227141 swi-prolog: prevent git from running during extraPacks install 2024-09-07 16:35:42 +02:00
Maren van Otterdijk
52057458d2 swi-prolog: 9.2.6 -> 9.2.7 2024-09-07 16:35:42 +02:00
Maren van Otterdijk
2e951824d9 swi-prolog: rename from swiProlog 2024-09-07 16:35:42 +02:00
github-actions[bot]
c35ab72937 Merge staging-next into staging 2024-09-07 12:05:25 +00:00
github-actions[bot]
de15243c9a Merge master into staging-next 2024-09-07 12:04:51 +00:00
David McFarland
ffe79ab08d dotnet: expose stage0 vmr derivations (#326815) 2024-09-07 09:00:28 -03:00
David McFarland
13a975148a dotnet: add override mechanism for nuget packages (#339953) 2024-09-07 09:00:01 -03:00
github-actions[bot]
899adc3017 Merge staging-next into staging 2024-09-07 00:13:22 +00:00
github-actions[bot]
b6b2ac4f61 Merge master into staging-next 2024-09-07 00:12:59 +00:00
Sam Connelly
58157652bc fasmg: j27m -> kd3c 2024-09-06 17:50:32 -04:00
David McFarland
6c5a9e5a43 dotnet-sdk-setup-hook: use temporary symlink dir for NUGET_FALLBACK_PACKAGES
Restore operations get extremely slow when there are a lot of paths in
NUGET_FALLBACK_PACKAGES.
2024-09-06 16:05:19 -03:00
David McFarland
2563bd752c dotnet-sdk-setup-hook: make shell vars local 2024-09-06 16:05:19 -03:00
David McFarland
e5cb52bd58 buildDotnetGlobalTool: move into dotnetCorePackages 2024-09-06 16:05:19 -03:00
David McFarland
5b31367e13 buildDotnetModule: move into dotnetCorePackages 2024-09-06 16:05:19 -03:00
R. Ryantm
32ba122494 fstar: 2024.01.13 -> 2024.09.05 2024-09-06 10:48:40 +00:00
Rafael Fernández López
17b3433ccf unison-ucm: 0.5.25 -> 0.5.26 2024-09-06 12:10:21 +02:00
github-actions[bot]
ef6da006cc Merge staging-next into staging 2024-09-06 06:04:57 +00:00
github-actions[bot]
6802206bcc Merge master into staging-next 2024-09-06 06:04:31 +00:00
Vladimír Čunát
115ede53f7 go_1_22: 1.22.6 -> 1.22.7 (#339946) 2024-09-06 06:21:57 +02:00
techknowlogick
0e0665d1e0 go_1_23: 1.23.0 -> 1.23.1
Changelog: https://go.dev/doc/devel/release#go1.23
2024-09-06 13:18:20 +10:00
David McFarland
7ea78aaf5a dotnetCorePackages.fetchNupkg: split from mkNugetDeps 2024-09-05 23:46:23 -03:00
David McFarland
d4776214f7 mkNugetSource/Deps: move into dotnetCorePackages 2024-09-05 23:46:23 -03:00
techknowlogick
4333fa1caa go_1_22: 1.22.6 -> 1.22.7
Changelog: https://go.dev/doc/devel/release#go1.22
2024-09-05 21:48:04 -04:00
David McFarland
04686b6b28 dotnet: add .nupkg.metadata to VMR packages
This fixes nuget-to-nix in projects that use the source-built sdk and
`linkNugetPackages`.
2024-09-05 22:47:39 -03:00
David McFarland
9a14832d2e dotnet: fix fetch-deps in paket projects 2024-09-05 22:47:38 -03:00
github-actions[bot]
e561aad2c8 Merge staging-next into staging 2024-09-06 00:13:44 +00:00
github-actions[bot]
25ef10109d Merge master into staging-next 2024-09-06 00:13:20 +00:00
Mathew Polzin
999e5e38a6 idris2Packages.idris2Lsp: fix cross eval (#339737) 2024-09-05 13:06:57 -05:00
Stefan Frijters
96cc7aa0ba idris2Packages.idris2Lsp: fix cross eval 2024-09-05 17:10:53 +02:00
github-actions[bot]
d3523eddf0 Merge staging-next into staging 2024-09-05 12:05:59 +00:00
github-actions[bot]
37c947df6c Merge master into staging-next 2024-09-05 12:05:31 +00:00
Pavol Rusnak
659533b08f gcc-arm-embedded: 13.2.rel1 -> 13.3.rel1 2024-09-05 09:15:33 +02:00
github-actions[bot]
d76d809dd4 Merge staging-next into staging 2024-09-05 00:13:35 +00:00
github-actions[bot]
74cdd9c9b1 Merge master into staging-next 2024-09-05 00:13:11 +00:00