Commit Graph

6450 Commits

Author SHA1 Message Date
7c6f434c
17b4ad7c2f
Merge pull request #217587 from winterqt/build-dotnet-module-darwin-sandbox
buildDotnetModule: fix sandboxed builds on darwin
2023-04-17 14:08:21 +00:00
Adam Joseph
9e3b2a5822
Merge pull request #226366 from mmlb/rename-gnatboot
gnatboot: rename to gnat-bootstrap
2023-04-16 22:37:53 +00:00
Atemu
f63a12f296 tree-wide: buildFHSUserEnv -> buildFHSEnv 2023-04-16 10:15:13 +02:00
Manuel Mendez
31d6802773 gnatboot: rename to gnat-bootstrap
Most other bootstrap compilers are named -bootstrap so lets follow that
pattern.
2023-04-15 18:52:14 -04:00
Kira Bruneau
99a95083df
Merge pull request #178280 from veprbl/pr/ccache_clang_fix
cc-wrapper: disable response files for ccache
2023-04-15 06:47:01 -04:00
Weijia Wang
ddd8604a3b moveBuildTree: init 2023-04-14 21:08:27 +03:00
Sandro
b04d4bad27
Merge pull request #216992 from SuperSandro2000/stdenvNative-fix-eval
{bintools,cc}-wrapper: don't fallback to version = null
2023-04-14 11:22:20 +02:00
Sandro Jäckel
7090651071
{bintools,cc}-wrapper: don't fallback to version = null
mkDerivation cannot handle that
2023-04-12 22:08:36 +02:00
Sandro Jäckel
a7dbdb7644
cc-wrapper: don't set env to null when nativeTools is used
This is not allowed and fails fatal
2023-04-12 22:08:36 +02:00
Adam Joseph
42c8e4dd18 build-rust-crate: dontStrip=!release
Without this PR, unlike `RUST_LIB_BACKTRACE=1 cargo run` you won't
get line numbers in backtraces from binaries built with:

```
nix build -f Cargo.nix --arg release false
```

This PR fixes that.
2023-04-12 15:24:50 -04:00
Vladimír Čunát
ac3acd956f
cc-wrapper: add optional temporary hack for -B
This fixes parts in llvmPackages_{13,rocm}
e.g. build .clang for testing.
Longterm mass-rebuild fix should come in PR #225846
2023-04-12 09:37:24 +02:00
github-actions[bot]
4e2c1815ed
Merge master into staging-next 2023-04-11 18:01:18 +00:00
Atemu
9f26295eaa
Merge pull request #225471 from Atemu/fhsenv-pname+version
buildFHSEnvBubblewrap: support pname + version
2023-04-11 15:35:43 +02:00
Atemu
7a1de48994 anki-bin: use pname + version instead of hacky override 2023-04-11 13:27:29 +02:00
Vladimír Čunát
e2691227cd
julia{18,19,}: fix build by a temporary hack
This is a low-rebuild version of PR #225273
/cc the proper and hopefully complete fix in PR #225220
2023-04-10 16:36:55 +02:00
Atemu
7398d5fc79 buildFHSEnvBubblewrap: support pname + version 2023-04-09 19:52:11 +02:00
github-actions[bot]
fc0616b73d
Merge master into staging-next 2023-04-09 06:01:16 +00:00
figsoda
ce0ee58e84
Merge pull request #224893 from amjoseph-nixpkgs/pr/crate-overrides/evdev-sys
default-crate-overrides.nix: prevent `git fetch`
2023-04-09 00:01:20 -04:00
zowoq
dc73bd6430 buildGo{Module,Package}: minor cleanup 2023-04-09 12:23:16 +10:00
github-actions[bot]
97afa6ec9b
Merge master into staging-next 2023-04-09 00:02:38 +00:00
Sandro
2341c80301
Merge pull request #219707 from Stunkymonkey/fetchmavenartifact-deprecate-phases 2023-04-09 01:42:04 +02:00
github-actions[bot]
8ae069b888
Merge master into staging-next 2023-04-08 12:01:05 +00:00
Franz Pletz
a50962e4c4
Merge pull request #224458 from helsinki-systems/upd/nginx
nginxMainline: 1.23.3 -> 1.23.4
2023-04-08 11:49:55 +02:00
github-actions[bot]
75e19b98bb
Merge master into staging-next 2023-04-08 00:02:03 +00:00
Justin Bedő
86dc68fab4
Merge pull request #224905 from NixOS/r-updates
rPackages: CRAN repository changes and treewide update
2023-04-08 06:45:19 +10:00
Adam Joseph
579b812b0e https://github.com/NixOS/nixpkgs/pull/224893#pullrequestreview-1375521876 2023-04-06 13:43:22 -07:00
Adam Joseph
482b61e142 default-crate-overrides.nix: prevent git fetch
The build.rs script shipped with evdev-sys attempts to detect cross
compilation and uses a completely different codepath which does a
`git fetch` inside the build script.  This doesn't work in nixpkgs.

This PR adds a `touch libevdev/.git` to trick the `build.rs` into
thinking that it is not necessary to do a `git fetch`.

Thanks to @figsoda for finding this more-elegant solution to the
problem (my original solution needed to patch `build.rs`):

  https://github.com/NixOS/nixpkgs/pull/224893#pullrequestreview-1373809617

Tested on:
- [x] `aarch64-linux` (cross from `x86_64-linux`)
2023-04-06 13:05:07 -07:00
github-actions[bot]
638ad26bf6
Merge master into staging-next 2023-04-06 16:11:06 +00:00
Uri Baghin
0a65747324
Merge pull request #224917 from uri-canva/uri/fix-symlinks
buildBazelPackage: fix difference between linux and darwin deps
2023-04-06 22:10:59 +10:00
github-actions[bot]
6e7ab02752
Merge master into staging-next 2023-04-06 06:01:26 +00:00
Uri Baghin
f8ee061247 buildBazelPackage: fix difference between linux and darwin deps 2023-04-06 11:42:46 +10:00
figsoda
bb70c6cba3
Merge pull request #224892 from amjoseph-nixpkgs/pr/crate-overrides/prost-build 2023-04-05 20:27:51 -04:00
Uri Baghin
3df364d185
Merge pull request #224765 from uri-canva/uri/overwrite
buildBazelPackage: allow buildAttrs and fetchAttrs to override inherited attrs
2023-04-06 10:13:53 +10:00
github-actions[bot]
be07e18261
Merge master into staging-next 2023-04-06 00:02:09 +00:00
Justin Bedo
2231a9c89a
Merge remote-tracking branch 'origin/master' into r-updates 2023-04-06 08:51:55 +10:00
Adam Joseph
476fde08af default-crate-overrides.nix: prost-build needs protobuf 2023-04-05 15:40:17 -07:00
Artturi
38263d02cf
Merge pull request #224503 from Artturin/nixpredockerfix 2023-04-06 00:09:41 +03:00
github-actions[bot]
ae5b53747b
Merge master into staging-next 2023-04-05 12:01:10 +00:00
Uri Baghin
1ee2c5c9eb buildBazelPackage: allow buildAttrs and fetchAttrs to override inherited attrs 2023-04-05 20:51:52 +10:00
Justin Bedo
3e6b47a007
rPackages: switch to official CRAN mirrors 2023-04-05 13:25:06 +10:00
Uri Baghin
440b4de588 buildBazelPackage: support multiple targets 2023-04-05 12:59:54 +10:00
Vladimír Čunát
834334f2c2
Merge #169327: cc-wrapper: fix minor problems
...into staging
2023-04-04 09:25:59 +02:00
Vladimír Čunát
87a8a597e6
Merge #223741: writeTextFile: chmod before checkPhase
...into staging
2023-04-04 08:57:05 +02:00
Robin Bate Boerop
824c9ac5c9 nix-prefetch-docker: handle overrides correctly
Without this change, the `--os` and `--arch` switches are disregarded
for operations involving `skopeo inspect` invocations. This means that,
for example, one cannot fetch Linux images while on macOS.
2023-04-03 21:12:13 +03:00
github-actions[bot]
a59e8336d7
Merge staging-next into staging 2023-04-03 18:01:56 +00:00
Bernardo Meurer
f1f6ca8bcd
Merge pull request #209870 from amjoseph-nixpkgs/pr/stdenv/external-gcc-bootstrap 2023-04-03 08:19:03 -07:00
ajs124
b7cb74322c fetchhg: allow specifying (sri) hash 2023-04-03 12:40:35 +02:00
Andrew Hamon
e929a99848 writeShellApplication: allow substitutions and remote building.
Unlike most other trivial builders, writeShellApplication has a
relatively heavy checkphase that invokes shellcheck. On my system,
a small writeShellApplication takes over 1 second to build.

This PR allows substitutions and stops preferring local builds for
writeShellApplication.
2023-04-02 14:36:32 -07:00
Adam Joseph
6c209e862e emacs: path fixes resulting from libgccjit changes
The Nix-driven bootstrap of gcc resulted in some changes to the
structure of the `libgccjit` outpaths, and also added an additional
output (`libgcc`) to `gcc`.

This commit makes the corresponding changes in the `emacs`
derivation in order to not break emacs.

Emacs is the only user of `libgccjit` in nixpkgs at the moment.
2023-04-02 13:49:54 -07:00
Adam Joseph
7553d0fe29 stdenv: Nix-driven bootstrap of gcc
#### Summary

By default, when you type `make`, GCC will compile itself three
times.  This PR inhibits that behavior by configuring GCC with
`--disable-bootstrap`, and reimplements the triple-rebuild using
Nix rather than `make`/`sh`.

 #### Immediate Benefits

- Allow `gcc11` and `gcc12` on `aarch64` (without needing new
  `bootstrapFiles`)
- Faster stdenv rebuilds: the third compilation of gcc
  (i.e. stageCompare) is no longer a `drvInput` of the final stdenv.
  This allows Nix to build stageCompare in parallel with the rest of
  nixpkgs instead of in series.
- No more copying `libgcc_s` out of the bootstrap-files or other
  derivations
- No more Frankenstein compiler: the final gcc and the libraries it
  links against (mpfr, mpc, isl, glibc) are all built by the same
  compiler (xgcc) instead of a mixture of the bootstrapFiles'
  compiler and xgcc.
- No more [static lib{mpfr,mpc,gmp,isl}.a hack]
- Many other small `stdenv` hacks eliminated
- `gcc` and `clang` share the same codepath for more of `cc-wrapper`.

 #### Future Benefits

- This should allow using a [foreign] `bootstrap-files` so long as
  `hostPlatform.canExecute bootstrapFiles`.
- This should allow each of the libraries that ship with `gcc`
  (lib{backtrace, atomic, cc1, decnumber, ffi, gomp, iberty,
  offloadatomic, quadmath, sanitizer, ssp, stdc++-v3, vtv}) to be
  built in separate (one-liner) derivations which `inherit src;`
  from `gcc`, much like https://github.com/NixOS/nixpkgs/pull/132343

 #### Incorporates

- https://github.com/NixOS/nixpkgs/pull/210004
- https://github.com/NixOS/nixpkgs/pull/36948 (unreverted)
- https://github.com/NixOS/nixpkgs/pull/210325
- https://github.com/NixOS/nixpkgs/pull/210118
- https://github.com/NixOS/nixpkgs/pull/210132
- https://github.com/NixOS/nixpkgs/pull/210109
- https://github.com/NixOS/nixpkgs/pull/213909
- https://github.com/NixOS/nixpkgs/pull/216136
- https://github.com/NixOS/nixpkgs/pull/216237
- https://github.com/NixOS/nixpkgs/pull/210019
- https://github.com/NixOS/nixpkgs/pull/216232
- https://github.com/NixOS/nixpkgs/pull/216016
- https://github.com/NixOS/nixpkgs/pull/217977
- https://github.com/NixOS/nixpkgs/pull/217995

 #### Closes

- Closes #108305
- Closes #108111
- Closes #201254
- Closes #208412

 #### Credits

This project was made possible by three important insights, none of
which were mine:

1. @ericson2314 was the first to advocate for this change, and
   probably the first to appreciate its advantages.  Nix-driven
   (external) bootstrap is "cross by default".

2. @trofi has figured out a lot about how to get gcc to not mix up
   the copy of `libstdc++` that it depends on with the copy that it
   builds, by moving the `bootstrapFiles`' `libstdc++` into a
   [versioned directory].  This allows a Nix-driven bootstrap of gcc
   without the final gcc would still having references to the
   `bootstrapFiles`.

3. Using the undocumented variable [`user-defined-trusted-dirs`]
   when building glibc.  When glibc `dlopen()`s `libgcc_s.so`, it
   uses a completely different and totally special set of rules for
   finding `libgcc_s.so`.  This trick is the only way we can put
   `libgcc_s.so` in its own separate outpath without creating
   circular dependencies or dependencies on the bootstrapFiles.  I
   would never have guessed to use this (or that it existed!) if it
   were not for a [comment in guix] which @Mic92 [mentioned].

My own role in this PR was basically: being available to go on a
coding binge at an opportune moment, so we wouldn't waste a
[crisis].

[aarch64-compare-ofborg]: https://github.com/NixOS/nixpkgs/pull/209870/checks?check_run_id=10662822938
[amd64-compare-ofborg]: https://github.com/NixOS/nixpkgs/pull/209870/checks?check_run_id=10662825857
[nonexistent sysroot]: https://github.com/NixOS/nixpkgs/pull/210004
[versioned directory]: https://github.com/NixOS/nixpkgs/pull/209054
[`user-defined-trusted-dirs`]: https://sourceware.org/legacy-ml/libc-help/2013-11/msg00026.html
[comment in guix]: 5e4ec82181/gnu/packages/gcc.scm (L253)
[mentioned]: https://github.com/NixOS/nixpkgs/pull/210112#issuecomment-1379608483
[crisis]: https://github.com/NixOS/nixpkgs/issues/108305
[foreign]: https://github.com/NixOS/nixpkgs/pull/170857#issuecomment-1170558348
[static lib{mpfr,mpc,gmp,isl}.a hack]: 2f1948af9c/pkgs/stdenv/linux/default.nix (L380)
2023-04-02 13:49:41 -07:00