Commit Graph

164 Commits

Author SHA1 Message Date
Vladimír Čunát
5804775d03
Merge branch 'staging' into staging-next 2024-05-31 07:30:41 +02: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
Sigmanificient
8b473d1a27 treewide: remove unused fetch* (and other) arguments 2024-05-30 13:36:48 +02:00
Ali Abrar
888dee445d openbsd: init at 7.5 2024-05-26 10:55:56 -04:00
John Ericson
d9c9da5d65 netbsd.makeMinimal: Make it possible to override the rules
Co-authored-by: Rahul Butani <rrbutani@users.noreply.github.com>
2024-05-26 10:55:15 -04:00
github-actions[bot]
a759c7f2d0
Merge staging-next into staging 2024-05-20 18:01:42 +00:00
Audrey Dutcher
feef074d47 freebsd: Don't discard request to strip installed binaries 2024-05-20 19:18:29 +02: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
John Ericson
56590dd7b3 netbsd: Remove unneded let-bind 2024-05-06 10:58:23 -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
John Ericson
22b1e25676 freebsd.mtree: Needs explicit callPackage
Otherwise we get an infinite recursion.

This fixes the bootstrap of FreeBSD, which uses this tool from NetBSD.
2024-04-30 10:39:33 -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
Sergei Trofimovich
3b924de945 netbsd.libcurses: fix eval around NIX_CFLAGS_COMPILE
Without the change the eval fails as:

    $ nix build --no-link -f. netbsd.libcurses
    ...
     … while evaluating attribute 'NIX_CFLAGS_COMPILE' of derivation 'libcurses-netbsd-9.2'
       error: value is a string while a list was expected
2023-12-27 14:13:46 +00:00
Astro
32ec12551f netbsd.sys: patch nocombreloc linker flag 2023-11-20 03:21:23 +01:00
Astro
26b585aa7b netbsd.sys: make compiler and linker warnings non-fatal 2023-11-20 03:20:24 +01: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
Randy Eckenrode
3f948b7664
netbsd.compat: use strip from cctools-port
llvm-strip does not support `-X` for Mach-O, so make sure the cctools
version is used.
2023-07-25 21:28:08 -04:00
Artturin
226e149145 treewide: env.NIX_CFLAGS_COMPILE use optionalString instead of optional
env values must be strings
2023-02-22 21:23:05 +02: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
Artturin
6f6cc4a22d treewide: use toString on list NIX_CFLAGS_COMPILE
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
2023-02-22 21:23:04 +02:00
github-actions[bot]
d8bfd0a059
Merge master into staging-next 2023-01-23 06:01:12 +00:00
Alyssa Ross
b19185fdb2
libiconv: use libc header on NetBSD
Let's be consistent about this.

Updated netbsd.libc to have a pname attribute so it's compatible with
libcIconv.
2023-01-22 21:11:41 +00:00
John Ericson
39f60a4e54
Merge pull request #210764 from alyssais/mtdev-freebsd
mtdev: add FreeBSD support
2023-01-18 20:23:44 -05: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
Alyssa Ross
0a77e09a83
netbsd.libpci: init at 9.2 2023-01-13 04:49:19 +00:00
Alyssa Ross
ce373ba234
netbsd.libarch: init at 9.2 2023-01-13 04:49:17 +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
Jan Tojnar
457f28f6f8 Merge branch 'master' into staging-next
; Conflicts:
;	pkgs/development/tools/codespell/default.nix

codespell 2.2.2 switched to pyproject & setuptools_scm:
https://github.com/codespell-project/codespell/pull/2523
2022-10-19 05:24:28 +02:00
Yureka
a25e03e76a
pkgsMusl.netbsd.install: fix build (#196260) 2022-10-19 00:22:54 +02:00
Ryan Burns
d5e1a54ffc netbsd.uudecode: fix build on darwin
Requires explicit link to libresolv
2022-10-17 17:24:44 -07:00
John Ericson
044163d6ef bsd: BSD_PATH rename to COMPONENT_PATH
@alyssais and I agreed this is clearer.
2022-10-06 15:33:36 -04:00
John Ericson
e3137f73fd netbsd.install: Use writeShellScript 2022-10-06 15:33:36 -04:00
John Ericson
dcf7a5ec3d netbsd: Adapt to BSD-common infra changes for FreeBSD
See https://github.com/NixOS/nixpkgs/pull/82131 for the rest of the
changes for FreeBSD. This is PRed separately because it is a macOS
moderate rebuild so we target staging.

The main change is that we CD to the path we're building *after*
applying patches, so we can patch other parts of the tree (from
`extraPaths`) as needed.

Another change is that `netbsd.install` no longer depends on `fts`,
which it evidently no longer needs.
2022-10-06 15:33:28 -04:00
Alyssa Ross
1a80365750
netbsd.libc: fix build
This has been broken since we made -fno-common the default.
2022-10-03 21:52:42 +00:00
Alyssa Ross
2b9c5958a1
netbsd.compat: don't use musl's sys/cdefs.h
When building glib statically, a Meson check would fail, because the
check would interpret any warning as failure, and it would see the
warning that the musl sys/cdefs.h emits about the file being
deprecated.
2022-01-06 14:22:07 +00:00
Alyssa Ross
7be5fbf70f
pkgsStatic.netbsd: fix nbtool_config.h conflicts
In pkgsStatic, /all/ build inputs are propagated.  This means that
netbsd.compat was propagated, along with its setup hook, which broke
static glib builds because glib defines a function with the same name
as one in nbtool_config.h, and nbtool_config.h was being automatically
included in every C file processed by the compiler, in any transitive
dependent of netbsd.compat's setup hook.

To fix this, rather than forcing nbtool_config.h to be included for
_every_ C file in a derivation that depends on netbsd.compat, modify
the NetBSD-specific mkDerivation to detect files that need the header,
and patch it in there where appropriate.  That way, only files that
are part of NetBSD will be affected, not all transitive dependents.
2022-01-06 14:20:18 +00:00
Ryan Burns
577c62aab1 os-specific/netbsd: fix mandoc splicing
This expression is not properly spliced, so we need to
manually specify buildPackages so that mandoc will not
be built for the host platform

Fixes cross-compilation of netbsd.* packages that depend
on mandoc in nativeBuildInputs, such as `getent`.
2021-12-10 18:30:37 -08:00