Commit Graph

317 Commits

Author SHA1 Message Date
Randy Eckenrode
5d128a9edc
netbsd.install: fix build with new Darwin SDK
To avoid adding headers to the SDK it does not have normally
(`libutil.h`), darwin.libutil is not propagated. It must be included as
a build input when it is needed by packages.
2024-10-10 01:07:20 -04:00
K900
b29cb6c1f9 Merge remote-tracking branch 'origin/master' into staging-next 2024-09-30 20:23:25 +03:00
Philip Taron
d590835329
fetchers: uniformly support the hash attribute (#342173) 2024-09-30 07:55:36 -07:00
Artturin
f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
github-actions[bot]
bcd5388d39
Merge master into staging-next 2024-09-24 12:05:12 +00:00
Audrey Dutcher
b2f439596d freebsd.mkDerivation: use stdenvNoLibs instead of stdenvNoLibc to avoid compiler-rt 2024-09-23 16:59:49 -07:00
github-actions[bot]
1f0ce6a4e5
Merge staging-next into staging 2024-09-19 12:05:50 +00:00
Jörg Thalheim
4f91815a07
freebsd: Fix obscure c++98 interaction used by gbenchmark (#335454) 2024-09-19 14:00:59 +02:00
nicoo
8af38be358 netbsd: sha256hash 2024-09-17 15:00:28 +00:00
Wolfgang Walther
202bfa48fd
freebsd: support structuredAttrs in setup hook
Couldn't test this, because freebsd.compat is failing with unrelated
errors for me.
2024-09-08 22:11:10 +02:00
Wolfgang Walther
9e836fddfe
openbsd: support structuredAttrs in setup hook
Tested openbsd.lorder with and without __structuredAttrs.
2024-09-08 22:11:10 +02:00
Wolfgang Walther
c3470fdfb7
netbsd: support structuredAttrs in setup hook
Tested netbsd.lorder with and without __structuredAttrs.
2024-09-08 22:11:10 +02:00
Wolfgang Walther
88a44bc843
bsd: shellcheck setup hook 2024-09-08 22:11:10 +02:00
Wolfgang Walther
c0e250354a
bsd: support structuredAttrs in setup hook
Tested netbsd.compat with and without structuredAttrs.
2024-09-08 22:11:10 +02:00
Wolfgang Walther
01126ae1e7
netbsd: use env. to pass RENAME environment variable
This is required to test netbsd.compat with structuredAttrs turned on
once the setup hooks support it.
2024-09-08 22:11:10 +02:00
John Ericson
f43cc75868
Clean up cross bootstrapping, take 2 (#321525) 2024-09-06 14:56:54 -04: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
Philip Taron
7b3a3f3f8b
freebsd.mkDerivation: remove with statements 2024-08-18 06:31:18 -07:00
Audrey Dutcher
9e9a1f737d freebsd: Add upstream patch fixing obscure c++98 interaction
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276738#c12

Using _Static_assert under -std=c++98 -pedantic-errors will fail in
FreeBSD 14.1. This fixes that, allowing software like gbenchmark to
run its tests against legacy c++ standards. This patch is pending for
FreeBSD 14.2, and should be removed for that release.
2024-08-16 14:26:48 -07:00
K900
4f29b5a16b Merge remote-tracking branch 'origin/staging-next' into staging 2024-07-31 08:57:17 +03:00
John Ericson
e460ff83fd
Merge pull request #330722 from artemist/freebsd-machine
freebsd: Handle MACHINE/MACHINE_ARCH/MACHINE_CPUARCH differences
2024-07-30 13:59:45 -05:00
github-actions[bot]
d0b2f51f0f
Merge staging-next into staging 2024-07-29 06:01:55 +00:00
John Ericson
18cb69fb9b
Merge pull request #330069 from rhelmot/freebsd-14.1
freebsd: 14.0 -> 14.1
2024-07-28 23:24:38 -05:00
Artemis Tosini
7e893695b8
freebsd: Handle MACHINE/MACHINE_ARCH/MACHINE_CPUARCH differences 2024-07-29 00:09:14 +00:00
Audrey Dutcher
43fb06aa92
freebsd: 14.0 -> 14.1 2024-07-28 19:42:11 +00:00
github-actions[bot]
4007341b1f
Merge staging-next into staging 2024-07-27 12:01:37 +00:00
Vladimír Čunát
64c6a981fe
Merge branch 'master' into staging-next 2024-07-27 09:18:58 +02:00
Silvan Mosberger
ae5377916f
Merge pull request #324696 from philiptaron/__attrsFailEvaluation/excluded-attrnames-at-any-depth
Remove test-pkgs, buildPackages, and buildFreebsd from excluded-attrnames-at-any-depth
2024-07-27 02:28:20 +02:00
github-actions[bot]
8c2e73a4ed
Merge staging-next into staging 2024-07-26 18:01:39 +00:00
Martin Weinelt
93f4195fe0
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/applications/graphics/seamly2d/default.nix
2024-07-26 18:05:04 +02:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
Philip Taron
48d1364929
Remove buildFreebsd from excluded-attrnames-at-any-depth 2024-07-25 17:28:00 -07:00
John Ericson
89af439710
Merge pull request #328782 from rhelmot/freebsd-gdb
gdb + deps: fix build on FreeBSD
2024-07-24 14:05:14 -04:00
Vladimír Čunát
cd346565bb
Merge branch 'master' into staging-next 2024-07-24 07:19:19 +02:00
Jörg Thalheim
afe8fbf038
Merge pull request #328582 from rhelmot/freebsd-stdenv
FreeBSD stdenv: re-init
2024-07-24 06:43:35 +02:00
Audrey Dutcher
5384421837 freebsd.libstdthreads: init 2024-07-20 17:04:37 -07:00
github-actions[bot]
e533bfc8da
Merge master into staging-next 2024-07-20 18:01:23 +00:00
John Ericson
5e826c3d2d
Merge pull request #327817 from rhelmot/freebsd-out-of-tree
freebsd.mkDerivation: do not crash on packages not using FreeBSD src
2024-07-20 11:35:35 -04:00
Vladimír Čunát
577f40b8a9
Merge branch 'staging' into staging-next 2024-07-20 16:12:24 +02:00
Audrey Dutcher
1e2071847d stdenv/freebsd: reinit
The old stdenv didn't work, and was also impure. The new one works, and
is pure. Presently, the bootstrap tools are cross compiled into one small
nar and one large tar, which is then unpacked, patched, and split into
smaller derivations. Efforts were made to make the boot process as short
as possible - there are only two clangs built, and as many packages are
propagated between stages as possible while leaving the bootstrap tools
out of the final stdenv's closure.
2024-07-19 21:32:05 -07:00
Randy Eckenrode
f9b7f4ec09
tree-wide: use top-level cctools 2024-07-17 22:36:19 -04:00
Audrey Dutcher
8e26d7ca85 freebsd.mkDerivation: do not crash on packages not using FreeBSD src
This includes drm-kmod and drm-kmod firmware.
2024-07-16 22:31:05 -07:00
Audrey Dutcher
cdb8017585 freebsd.mkDerivation: re-add missing hunk 2024-07-16 22:12:42 -07:00
Sigmanificient
512e8afdb9 treewide: remove unused occurence of stdenv (and other) arguments
format (will squash)
2024-07-14 04:32:56 +02:00
John Ericson
000b58721f Merge remote-tracking branch 'upstream/master' into openbsd-static 2024-07-09 18:18:47 -04:00
John Ericson
676df1cf2d openbsd: Add static linking support
I've had better luck creating statically-linked binaries that work than
dynamically-linked ones, so this is needed quite practically.
2024-07-09 18:17:06 -04:00
Masum Reza
0c4a8b4f89
Merge pull request #320472 from rhelmot/freebsd-libunwind-mess
{llvm,freebsd.libcxxrt}: Sort out references to unwind functions
2024-07-04 16:43:06 +05:30
Masum Reza
2b8f96c5b8
Merge pull request #320475 from rhelmot/freebsd-various2
freebsd: various new packages to support a NixBSD system
2024-07-04 11:08:52 +05:30
Audrey Dutcher
e589fdb72d chore: Remove with lib from various freebsd packages
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
2024-07-02 20:18:55 -07:00