Commit Graph

131 Commits

Author SHA1 Message Date
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