Commit Graph

2853 Commits

Author SHA1 Message Date
Randy Eckenrode
22885f81c5
freshBootstrapTools.bootstrapTools: update for new SDK pattern
- Drop libSystem. It’s no longer needed. The SDK can be downloaded and
  built with existing tools.
- Add jq and tapi. Adding these allows the stdenv bootstrap to stop
  special-casing stage 0.
- Update tests for updated ld64. It handles code-signing properly, so
  the signatures aren’t broken.
2024-10-11 18:40:58 -04:00
Randy Eckenrode
840a4f7771
darwin.stdenv: propagate bmake from stage 1 (for darwin.locale) 2024-10-11 17:58:38 -04:00
Randy Eckenrode
1d030c0ad7
darwin.stdenv: propagate darwin.locale as a no-CC package 2024-10-11 17:58:21 -04:00
Randy Eckenrode
092b50a92c
python3: fix stdenv bootstrap on x86_64-darwin
The bootstrap tools linker sometimes crashes when trying to link the
sqlite3 tests, which causes the bootstrap Python not to have the sqlite3
module. This causes the freezegun module to fail to build later in the
bootstrap. Using the 11.0 SDK fixes the problem.

Upstream Python supports building with a newer SDK and back-deploying,
so this change should not negatively affect users on pre-11.0 releases.
2024-10-10 16:23:09 -04:00
Randy Eckenrode
0e61488c5b
overrideSDK: update for the new SDK
Change the adapter to add the requested SDK to the target’s build
inputs. Note that only the “11.0” (i.e., 11.3) and 12.3 SDKs are
supported. This adapter is retained for compatibility. The preferred way
to override the SDK is to add it to the appropriate inputs directly.
2024-10-10 16:23:08 -04:00
Randy Eckenrode
1c26a2fabc
makeStaticDarwin: handle when env.NIX_CFLAGS_LINK is set 2024-10-10 16:23:08 -04:00
Randy Eckenrode
66fcbb94e7
makeStaticDarwin: drop darwin-portable-libSystem-hook
`${stdenv.cc.libc}/lib/libSystem.B.dylib` does not exist and not existed
for as long as I have used nixpkgs. Since `/usr/lib/libSystem.B.dylib`
is already linked via text-based stubs, continue relying on those.
2024-10-10 16:23:08 -04:00
Randy Eckenrode
b7442b9066
darwin.stdenv: provide an SDK when cross-compiling
Static can rely on the standard cross-SDK because it will be a static
SDK when building for static targets.
2024-10-10 16:23:04 -04:00
Randy Eckenrode
9c004ef367
darwin.stdenv: use xarMinimal
Using xarMinimal avoids pulling e2fsprogs and (eventually) macfuse-stubs
into the Darwin stdenv bootstrap.
2024-10-10 16:23:03 -04:00
Randy Eckenrode
76a5ef680e
darwin.stdenv: rework for the new SDK
While it would be nice if this could be split, there are too many
changes as part of the cleanup and improvements, including:

- Refactoring all propagated packages into functions that can be used to
  ensure that packages are propagated only at the expected stages;
- Using a sanity-checking merge function to ensure that packages are
  only propagated by one of the above functions;
- Reducing the number of Python builds during the bootstrap to one;
- Removing the extra sysctl stage;
- Using the LLVM bootstrap to build LLVM, clang, libc++, etc;
- Propagating llvmPackages_<version> in the final stdenv, so that
  packages needing that version specifically don’t have to rebuild it;
- Bootstrapping with the new Darwin SDK; and
- Reducing the overall number of paths build during a bootstrap by ~33%.
2024-10-10 16:23:03 -04:00
Stig Palmquist
c49774ff46
perl540: fix build in stage1, add C locale patch
- Add patch from Perl upstream fixing build if only C locale is
  available

- Change back from `perl538` to `perl` (perl540) in bootstrap-stage-1
2024-09-25 18:38:27 +02:00
Simon Hauser
8cd3989e4d
gawk: 5.2.2 -> 5.3.1
Changelog:
- https://lists.gnu.org/archive/html/info-gnu/2023-11/msg00000.html
- https://mail.gnu.org/archive/html/info-gnu/2024-09/msg00008.html
2024-09-23 19:04:39 +02:00
github-actions[bot]
7fc19ff961
Merge staging-next into staging 2024-09-20 18:05:01 +00:00
Johannes Kirschbauer
e2dd770370
Doc: clarify mkDerivation argument handling (#343247) 2024-09-20 16:01:49 +02:00
github-actions[bot]
33e2cbc61f
Merge staging-next into staging 2024-09-20 12:05:56 +00:00
Johannes Kirschbauer
f14a171413
Doc: init stdenv.mkDerivation doc-comment 2024-09-20 12:13:43 +02:00
github-actions[bot]
1c3463dc7a
Merge staging-next into staging 2024-09-16 12:06:19 +00:00
Yueh-Shun Li
30809ccecd stdenv.mkDerivation: simplify overrideAttrs with extends and toOverlay 2024-09-14 20:56:49 +08:00
Philip Taron
e630216c6b
[staging] perl: 5.38.2 -> 5.40.0 (#333286)
After discussing on Matrix in the [#staging](https://matrix.to/#/#staging:nixos.org) room, I'm merging this as-is without waiting for changes to the `enableParallelBuilding = false;` line.

There are several in-the-wings PRs (one from @emilazy) that attempt to bring load-limit, which is a more sensible accounting of the work that a derivation is doing, into Nix itself. If and when that lands, we'll be able to just set `enableParallelBuilding = true;` again, without any specific casing around the `NIX_BUILD_CORES` stdenv variable.
2024-09-12 16:22:26 -07:00
Philip Taron
05e5a56f04
auto-patchelf: refactor structuredAttrs support (#340858) 2024-09-12 15:13:20 -07:00
Wolfgang Walther
bc0395ee6f
auto-patchelf: refactor structuredAttrs support
stdenv now provides better tooling to support structuredAttrs without
depending on $__structuredAttrs itself.
2024-09-11 19:29:39 +02:00
Philip Taron
f4cd623ed3
stdenv: bump required Bash version from 4 to 5 (#340765) 2024-09-11 07:32:57 -07:00
Aleksana
cda49c202f
stdenv/freebsd: don't inherit curl from previous stage (#340913) 2024-09-11 09:12:33 +08:00
Audrey Dutcher
5da4fa1dd6 stdenv/freebsd: don't inherit curl from previous stage
This was adding dependencies on the bootstrap files for longer than
necessary.
2024-09-09 19:40:56 -07:00
Ivan Trubach
799d0c8a7d stdenv: bump required Bash version from 4 to 5
Currently stdenv requires Bash 4.x that was released in 2009. This
change bumps the required version to Bash 5.x (2019, 5 years ago).

See https://mywiki.wooledge.org/BashFAQ/061 for more details.

Using a relatively modern Bash version allows us to rely on newer
features (e.g. ${var@a}) and remove workarounds for older quirks (e.g.
https://stackoverflow.com/a/7577209, “old bash empty array problem”).
Note that many setup hooks are using features added after 4.0 version,
e.g. makeWrapper uses ${var@Q} from 4.4, but some even require >5.0,
e.g. cargoBuildHook uses ${var@U} from 5.1.
2024-09-09 15:22:11 +03:00
github-actions[bot]
90a93f92bb
Merge master into staging-next 2024-09-09 12:05:58 +00:00
Audrey Dutcher
423dc16f1a Include libclang-rt in the FreeBSD bootstrap tools 2024-09-08 11:08:07 -07:00
github-actions[bot]
5a5ebe5a1c
Merge master into staging-next 2024-09-07 18:04:01 +00:00
Marcus Ramberg
384f9f8336
perl: 5.38.2 -> 5.40.0
- perl: perl538 -> perl540
- perl: disable parallel building as it fails for 5.40
- perlPackages: perl538Packages -> perl540Packages
- perlCross:  84db4c7 -> 1.6
2024-09-07 19:09:39 +02:00
Jörg Thalheim
54216ceb22 pkgs/stdenv/freebsd: update x86_64-unknown-freebsd bootstrap-files
sha256sum of files to be uploaded:

$ sha256sum /nix/store/ikzxl9ws9yxrl8g8z2kcjwqlq5gfjbhx-build/on-server/*
7fb16ac6da63effd126ecfa452032cee82742663ee8776ea0f66333814f0d9f7  /nix/store/ikzxl9ws9yxrl8g8z2kcjwqlq5gfjbhx-build/on-server/bootstrap-tools.tar.xz
aff88c12a32eab790f8bbaea08ef4917b0a52ea71ca2fcefe8093f1f40c1ff27  /nix/store/ikzxl9ws9yxrl8g8z2kcjwqlq5gfjbhx-build/on-server/unpack.nar.xz

Suggested commands to upload files to 'tarballs.nixos.org':

    $ nix-store --realize /nix/store/ikzxl9ws9yxrl8g8z2kcjwqlq5gfjbhx-build
    $ aws s3 cp --recursive --acl public-read /nix/store/ikzxl9ws9yxrl8g8z2kcjwqlq5gfjbhx-build/on-server/ s3://nixpkgs-tarballs/stdenv/x86_64-unknown-freebsd/6414ef7ca3bf18ec4f9628d09ccc1eb030276ee2
    $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/x86_64-unknown-freebsd/6414ef7ca3bf18ec4f9628d09ccc1eb030276ee2 ./
    $ sha256sum bootstrap-tools.tar.xz unpack.nar.xz
    $ sha256sum /nix/store/ikzxl9ws9yxrl8g8z2kcjwqlq5gfjbhx-build/on-server/*
2024-09-07 09:19:18 +02:00
github-actions[bot]
b6b2ac4f61
Merge master into staging-next 2024-09-07 00:12:59 +00:00
Philip Taron
d89b0969ac
overrideSDK: fix on aarch64-darwin (#340131) 2024-09-06 14:01:44 -07:00
John Ericson
f43cc75868
Clean up cross bootstrapping, take 2 (#321525) 2024-09-06 14:56:54 -04:00
Emily
f69ba1fed5 overrideSDK: fix on aarch64-darwin
I don’t want to talk about it.

Fixes QEMU.
2024-09-06 16:59:17 +01:00
John Ericson
5f134ec6cf Clean up cross bootstrapping
For a long time, we've had `crossLibcStdenv`, `*Cross` libc attributes,
and `*bsdCross` pre-libc package sets. This was always bad because
having "cross" things is "not declarative": the naming doesn't reflect
what packages *need* but rather how we *provide* something. This is
ugly, and creates needless friction between cross and native building.

Now, almost all of these `*Cross` attributes are gone: just these are
kept:

- Glibc's and Musl's are kept, because those packages are widely used
  and I didn't want to risk changing the native builds of those at this
  time.

- generic `libcCross`, `theadsCross`, and friends, because these relate
  to the convolulted GCC bootstrap which still needs to be redone.

The BSD and obscure Linux or freestnanding libcs have conversely all
been made to use a new `stdenvNoLibc`, which is like the old
`crossLibcStdenv` except:

1. It usable for native and cross alike

2. It named according to what it *is* ("a standard environment without
   libc but with a C compiler"), rather than some non-compositional
   jargon ("the stdenv used for building libc when cross compiling",
   yuck).

I should have done this change long ago, but I was stymied because of
"infinite recursions". The problem was that in too many cases we are
overriding `stdenv` to *remove* things we don't need, and this risks
cyles since those more minimal stdenvs are used to build things in the
more maximal stdenvs.

The solution is to pass `stage.nix` `stdenvNoCC`, so we can override to
*build up* rather than *tear down*. For now, the full `stdenv` is also
passed, so I don't need to change the native bootstraps, but I can see
this changing as we make things more uniform and clean those up.

(adapted from commit 51f1ecaa59)
(adapted from commit 1743662e55)
2024-09-06 10:26:56 -04:00
github-actions[bot]
74cdd9c9b1
Merge master into staging-next 2024-09-05 00:13:11 +00:00
Philip Taron
8ed9f95120
stdenv: Allow user to supply their bootstrapFiles set of tools (#317119) 2024-09-04 11:34:37 -07:00
github-actions[bot]
a07f612219
Merge master into staging-next 2024-09-03 00:13:11 +00:00
Azat Bahawi
e8f0b7b782
stdenv: throw when using mold for targeting darwin
Mold does not support linking Mach-O, but still can be used on MacOS to
emit ELF.

Fixes: #338970
2024-09-02 13:59:59 +03:00
w
d7ec977f86 stdenv: Allow user to supply their bootstrapFiles set of tools 2024-08-30 02:31:18 +00:00
github-actions[bot]
4a1df24885
Merge staging-next into staging 2024-08-29 06:05:29 +00:00
github-actions[bot]
b430e34392
Merge master into staging-next 2024-08-29 06:05:05 +00:00
Philip Taron
4758cfe98f
stdenv/linux: disable and drop isl from gcc's bootstrap tools (#336985) 2024-08-28 19:32:54 -07:00
Philip Taron
0d1b26857b
treewide: support structuredAttrs in setup hooks (part 2) (#335666) 2024-08-28 14:07:58 -07:00
github-actions[bot]
4420fe8b58
Merge staging-next into staging 2024-08-28 12:05:53 +00:00
github-actions[bot]
42531ffc56
Merge master into staging-next 2024-08-28 12:05:25 +00:00
Jörg Thalheim
2c9d00dbed
pkgs/stdenv/linux: update s390x-unknown-linux-gnu bootstrap-files (#334334) 2024-08-28 09:27:19 +02:00
Emily
e1c31678e8
xar: 1.6.1 -> 498 (#329721) 2024-08-27 03:00:43 +01:00
Ivan Trubach
5eee6cf40a xar: 1.6.1 -> 498
This change switches the xar package from unmaintained fork of the
original project to the Apple Open Source tarball. See also
https://repology.org/project/xar/versions

Since the package is essentially rewritten from scratch, we take an
opportunity and move it to pkgs/by-name/xa/xar (formatted with nixfmt).

We also remove Windows from the supported platforms because even before
this change pkgsCross.mingwW64.xar failed with
xar> configure: error: can not detect the size of your system's uid_t type
2024-08-25 18:10:08 +03:00
Wolfgang Walther
1efcffa700
stdenv: support default values in concatTo
The previously used pattern was introduced in #318614, but technically
leaked the default flags into the global scope. While this would
probably not make much of a practical difference, making concatTo
support default values is a much cleaner approach.
2024-08-24 12:23:35 +02:00