Commit Graph

131 Commits

Author SHA1 Message Date
Audrey Dutcher
7627bc4be2 freebsd.truss: init 2024-07-02 20:18:53 -07:00
Audrey Dutcher
352259d523 freebsd.services_mkdb: init 2024-07-02 20:18:53 -07:00
Audrey Dutcher
1185d75848 freebsd.syslogd: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
f3c9e4af03 freebsd.shutdown: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
70236c2ac6 freebsd.daemon: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
b9f1c7e7c5 freebsd.newsyslog: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
cc86fcbcca freebsd.libifconfig: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
64e36d5999 freebsd.libbsdxml: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
a03b493adc freebsd.lib80211: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
9f84814541 freebsd.ifconfig: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
80e3ecafa0 freebsd.route: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
8479282bca freebsd.libkiconv: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
54f1777830 freebsd.mount_msdosfs: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
c94a2a2435 freebsd.limits: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
f80a34ddb2 freebsd.id: init 2024-07-02 20:18:52 -07:00
Audrey Dutcher
22a4ba421e freebsd.protect: init 2024-07-02 20:18:51 -07:00
Audrey Dutcher
a25eb642f7 freebsd.rcorder: init 2024-07-02 20:18:51 -07:00
Audrey Dutcher
95bed7c788 freebsd.rc: init 2024-07-02 20:18:51 -07:00
Audrey Dutcher
b85f78bfa8 freebsd.login: init 2024-07-02 20:18:51 -07:00
Audrey Dutcher
d58f00efe2 freebsd.libradius: init 2024-07-02 20:18:51 -07:00
Audrey Dutcher
4fdc9f9d17 freebsd.libbsm: init 2024-07-02 20:18:51 -07:00
Audrey Dutcher
6e52c40871 freebsd.libpam: init 2024-07-02 20:18:51 -07:00
Audrey Dutcher
7ada439627 freebsd.cap_mkdb: init 2024-07-02 20:18:51 -07:00
Audrey Dutcher
a20e099c9a freebsd.getty: init 2024-07-02 20:18:39 -07:00
John Ericson
744d7e7477 *bsdCross: Remove these package sets
I realized what rhelmot did in 61202561d9
(specify what packages just need `stdenvNoLibc`) is definitely the right
approach for this, and adjusted NetBSD and OpenBSD to likewise use it.
With that change, we don't need these confusing and ugly `*bsdCross`
package sets at all!

We can get rid of a lot more libc-related `*Cross`, and I will do so
soon, but this is the first step.

(adapted from commit 51f1ecaa59)
2024-06-21 11:47:36 -04:00
Vladimír Čunát
879821772c
Revert #320852: Clean up cross bootstrapping
It rebuilt stdenv on *-darwin; we can't do that in nixpkgs master.
This reverts commit 2f20501c5f, reversing
changes made to fd469c24af.
2024-06-21 07:48:24 +02:00
John Ericson
1743662e55 *bsd.mkDerivation: Fix comment about STRIPBIN 2024-06-20 10:55:02 -04:00
John Ericson
51f1ecaa59 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.

Finally, the BSDs also had to be cleaned up, since they have a few
pre-libc dependencies, demanding a systematic approach. I realized what
rhelmot did in 61202561d9 (specify what
packages just need `stdenvNoLibc`) is definitely the right approach for
this, and adjusted NetBSD and OpenBSD to likewise use it.
2024-06-18 17:04:16 -04:00
Audrey Dutcher
c9b08ff772 freebsd.getent: init 2024-06-17 08:57:44 -07:00
Audrey Dutcher
d942e3fec6 freebsd.pwd_mkdb: init 2024-06-17 08:57:43 -07:00
Audrey Dutcher
27b9567edd freebsd.nscd: init 2024-06-17 08:57:42 -07:00
Audrey Dutcher
b51604ab2a freebsd.mount: init 2024-06-17 08:57:40 -07:00
Audrey Dutcher
c171489cc5 freebsd.top: init 2024-06-17 08:57:39 -07:00
Audrey Dutcher
77177e301e freebsd.sysctl: init 2024-06-17 08:57:37 -07:00
Artemis Tosini
2cc0692eef freebsd.libcxxrt: don't copy unwind headers
These headers conflict with the unwind headers from libunwind
provided by libgcc_eh in `freebsd.libc`.
Upstream FreeBSD does not use these headers in any capacity,
and they cause some incompatibilities since libcxxrt unwind.h
requires _GNU_SOURCE for some functions, while libunwind does not.
2024-06-17 00:36:03 -07:00
Audrey Dutcher
ae7c4ca17f freebsd.libcxxrt: fixup in preparation for inclusion in stdenv
- add option to build without libcxx
- don't build with libcxx
- distribute headers
2024-06-12 07:41:44 -07:00
Audrey Dutcher
41c2bba81e freebsd.ldd: init 2024-05-31 13:25:22 -07:00
Audrey Dutcher
8d5db1db16 freebsd.iconv: init 2024-05-31 13:25:22 -07:00
Audrey Dutcher
1bc374d91d freebsd.cp: init
While cp is part of freebsd.bin, this particular package is critical for
early stdenv boot and has its own derivation to require fewer
dependencies
2024-05-31 13:25:22 -07:00
Audrey Dutcher
2bf350788c freebsd.bin: init
This is a single derivation containing everything in /bin on a normal
FreeBSD machine, which is an incredibly compact set of core utilities.
2024-05-31 13:25:22 -07:00
Audrey Dutcher
fe0a405397 freebsd.locale: init 2024-05-31 13:25:22 -07:00
Audrey Dutcher
2c41534d75 freebsd.locales: init
The parameters to control which locales are built are placeholders.
2024-05-31 13:25:22 -07:00
Audrey Dutcher
ce0a5ce340 freebsd.localedef: init 2024-05-31 13:25:10 -07:00
Audrey Dutcher
892f600edd freebsd.libcapsicum: init 2024-05-31 10:37:44 -07:00
Audrey Dutcher
7853602867 freebsd.libcasper: init 2024-05-31 10:37:44 -07:00
Audrey Dutcher
ae993bd1e3 freebsd.libdl: init 2024-05-31 10:37:44 -07:00
Audrey Dutcher
a753d385da freebsd.libjail: init 2024-05-31 10:37:44 -07:00
Audrey Dutcher
98587064a0 freebsd.libedit: init 2024-05-31 10:37:44 -07:00
Audrey Dutcher
d792ea2d41 freebsd.{libncurses,libncurses-tinfo}: init
These packages are preferred over libncurses proper for some in-tree
FreeBSD packages.
2024-05-31 10:37:44 -07:00
Audrey Dutcher
95fa436fbe freebsd.libelf: init 2024-05-31 10:37:43 -07:00
Audrey Dutcher
d78f853f7e freebsd.libxo: init 2024-05-31 10:37:43 -07:00
Audrey Dutcher
61202561d9 freebsd.{libc,compat,include}: use no-libs stdenv
Previously, an attribute named isStatic did this, but this was lost in a
refactor. Revive it and rename it to noLibc to be more clear about its
intended use.
2024-05-31 10:37:43 -07:00
Audrey Dutcher
ba5f1b4400 freebsd.mkDerivation: process patches generated with git
The diff parsing was pretty hardcoded for diff -u. Now it should handle
git diff/show as well.
2024-05-31 10:37:43 -07:00
Audrey Dutcher
2785d4f4ae freebsd.filterSource: use a less featureful rsync
By adding fewer dependencies, the FreeBSD native bootstrap tarball
becomes lighter.
2024-05-31 10:37:43 -07:00
Audrey Dutcher
295c645d80 freebsd.boot-install: wrap coreutils install instead of netbsd
netbsd can no longer compile under FreeBSD native early bootstrap
stdenv, so switch to coreutils. This only involves discarding the -l
flag. The -l flag causes a symlink instead of a copy to be installed, so
it is safe to discard during bootstrap.
2024-05-31 10:37:43 -07:00
Audrey Dutcher
bcaca23529 freebsd.compat: re-add lost patch
This patch was applied to 14.0 but not 13.1. It is necessary for 13.1 as
well.
2024-05-31 10:37:43 -07:00
Audrey Dutcher
23f95cd5a8 freebsd.libcxxrt: init
This package will be necessary down the line for binary patching
applications built for non-nix FreeBSD. It is additionally being
considered for inclusion in FreeBSD libcxx, both cross and native.
2024-05-30 09:40:46 -07:00
Ali Abrar
888dee445d openbsd: init at 7.5 2024-05-26 10:55:56 -04:00
sternenseemann
8dbe89fbe0 freebsd: fix eval with Nix < 2.6 2024-05-20 17:56:56 +02:00
Audrey Dutcher
2cc214b4c3 freebsd: 13.1.0 -> 14.0.0
The old patches are kept because the version is actually configurable.
In the future both versions may be exposed.

Co-Auhtored-By: Artemis Tosini <me@artem.ist>
Co-Authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2024-05-11 21:52:31 -04:00
Artemis Tosini
06b05d2289 freebsd: Cleanup, get ready to support version 14
* Extend libc

  Include non-libc core libraries in the libc package. Many of these
  mirror libraries present in glibc on linux, such as libgcc, libraries
  used for iconv, and libraries used for reading kernel info (libkvm,
  libprocstat, libmemstat).

  Without this many packages outside the freebsd tree would need to be
  modified to include standard dependencies which would already be on
  the system for other packages.

* Mark FreeBSD as using LLVM

* Update default LLVM version FreeBSD

* Use patch monolith

  The patchesRoot system combined with the fact that each derivation
  will Request specific names of patches makes it very annoying to use
  other FreeBSD source trees with nixpkgs. This new system allows
  providing one Or more entire trees of patches whose contents will be
  dynamically Parsed and only the relevant patches will be applied for
  any one Derivation.

  With this commit, the following knobs are available for specifying the
  FreeBSD source:

  - overriding `freebsd.versionInfo`, for picking another official
    supported FreeBSD release.

  - overriding `freebsd.source` for specifying a specific unpatched
    FreeBSD source tree.

  - overriding `freebsd.patches`, for specifying the patches to apply.

Co-Authored-by: Audrey Dutcher <audrey@rhelmot.io>
Co-Authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2024-05-11 21:52:07 -04:00
John Ericson
3fe3b055ad bsd treewide: Run RFC formatter 2024-05-06 10:59:45 -04:00
Audrey Dutcher
571f390dd9 freebsd: Only support branch selection via override... for now.
Remove config element for freebsdBranch
2024-05-03 14:18:12 -04:00
Audrey Dutcher
d5972ed69f freebsd: Only export a limited number of attributes to top-level 2024-05-03 14:16:54 -04:00
Audrey Dutcher
da9c1825bc freebsd/{pkgs,patches}: Move patches to version-dependent patches dir 2024-05-03 13:08:44 -04:00
John Ericson
b64a9bb1a9 freebsdBranches{,Cross}: Init
This creates multiple package sets for different versions. The other
versions don't yet work, but that will be fixed in subsequent PRs.

Push versionData into package set so that it can be overridden

Co-Authored-By: Audrey Dutcher <audrey@rhelmot.io>
Co-Authored-By: Artemis Tosini <me@artem.ist>
2024-05-03 13:06:34 -04:00
John Ericson
8bbf167e3b freebsd: Include more version info and update
We want to know the minor versions.

We want to know the patch versions too, where possible. We get those
either from the branch when it is the form `RELEASE-p<patch>`, or from
the tag when its in the form `release/<major>.<minor>.<patch>`.
2024-05-01 10:25:31 -04:00
Ali Abrar
f0b2aa7354 netbsd: move packages into their own modules 2024-04-22 10:53:59 -04:00
John Ericson
1bcf7a8b53 freebsd: Use's @rhelmot's version infra
This is in preparation for multiple version support, and PR #298849.
2024-04-01 10:45:54 -04:00
Audrey Dutcher
0157c5f328 FreeBSD: Use separate files for packages
There are a number of packages that we ought to be able to autocall, but
cannot because we need to add manual arguments just to avoid splicing.
This sucks but is the right call for now --- the conclusion should be
not that auto-calling is bad, but that splicing is bad.

This tries to do nothing but move things around; hashes are almost
unchanged. @rhelmot then has more changes to do on top of this, which
will be easier to review since code will be modified in place rather
than moved around and modified at the same time.
2024-03-28 09:41:50 -04:00
Ryan Burns
b79cbf32ea freebsd.libc: fix build with LLVM 16+ 2024-01-02 20:29:57 -08:00
Adam Joseph
cbc8aa437c treewide: use uncurried version of makeScopeWithSplicing 2023-08-14 02:51:10 +03:00
Jan Malakhovski
5852f26bdc treewide: noop: refer to src.name or similar in sourceRoot where appropriate, part 1: trivial cases 2023-08-03 16:32:03 +00:00
Silvan Mosberger
a0b8caf3bc
Revert "lib.customisation: uncurry makeScopeWithSplicing" 2023-07-28 23:04:09 +02:00
Artturin
3716ef19d8 lib.makeScopeWithSplicing: provide default for keep,extra
These are often unneeded by the user.
2023-07-28 17:41:01 +03:00
Adam Joseph
cb13669b00 lib.customisation: uncurry makeScopeWithSplicing
Deeply-curried functions are pretty error-prone in untyped languages
like Nix.  This is a particularly bad case because
`top-level/splice.nix` *also* declares a makeScopeWithSplicing, but
it takes *two fewer arguments*.

Let's switch to attrset-passing form, to provide some minimal level
of sanity-checking.
2023-07-27 21:31:59 -07:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Alyssa Ross
079e593d72
evdev-proto: init at 6.0
FreeBSD implements Linux's evdev API, but doesn't come with headers
for it.  Instead, the Linux headers are just modified to be suitable
for FreeBSD, via a port called evdev-proto.  I don't want to copy the
complicated sed expressions from the port into Nixpkgs, so instead we
just build and install the port inside a Nix derivation.
2023-01-15 17:50:05 +00:00
Alyssa Ross
eaf77e7b0b
freebsd.sed: init at 13.1.0 2023-01-14 19:33:40 +00:00
Artturin
58fa78077c treewide: use splicing convenience functions 2022-12-25 14:05:03 +02:00
John Ericson
0afe9d1f70 freebsd packages: Init at 13.1
Always set `SRCTOP`, set it with abs path

llvmPackages: Bump minimum version for FreeBSD

llvmPackages_*, libgcc, compiler_rt: Hack in enough libs that one can compiler C

freebsd.compat: Rename some things to work around cc-wrapper change

0bea4a194f / #191724 in particular
2022-11-04 16:50:26 -04:00