Commit Graph

489 Commits

Author SHA1 Message Date
seth
b5bf8e3fc7
lib.systems.examples: add aarch64-w64-mingw32 2024-11-06 17:22:52 -05:00
seth
205faabfeb
lib.systems.doubles: add aarch64-windows double 2024-11-06 17:22:52 -05:00
Jörg Thalheim
8885a1e21a lib/systems/architectures: add sapphirerapids/emeraldrapids
For reference: https://en.wikichip.org/wiki/intel/microarchitectures/sapphire_rapids

https://www.phoronix.com/news/GCC-13-Initial-Emerald-Rapids
https://www.phoronix.com/news/LLVM-Adds-Intel-Emerald-Rapids
2024-10-08 14:19:23 +02:00
Zhaofeng Li
b8c1ef98e4 nixos/binfmt: Add option to use static emulators when available
The fixBinary flag will be enabled if a static emulator is in use.
2024-10-01 15:05:32 +09:00
Julius Michaelis
4658a06076 lib/systems: use qemu-user package instead of custom definition 2024-10-01 15:05:32 +09:00
oxalica
a9fe4d6d8c lib.systems: fix rustTarget for WASI
The corresponding Rust target name is "wasm32-wasip?", not
"wasm32-unknown-wasi".
2024-09-30 23:34:40 +02:00
Artturin
aed1142d79 lib.systems.examples: Fix deprecated attr
`For android 'sdkVer' has been renamed to 'androidSdkVersion'`

While doing the above rename I forgot to consider if there were still
darwin platforms in `lib.systems.examples` using `sdkVer`

These still fail eval, but that happened before the renaming too.

`error: Unsupported sdk: 14.3`
2024-09-30 18:14:21 +03:00
github-actions[bot]
ce19166255
Merge master into staging-next 2024-09-02 18:04:19 +00:00
Alyssa Ross
4b6c89a670 lib.systems: add rustTarget for riscv32
Fixes buildPackages.rustc when cross compiling to riscv32.
2024-09-02 15:15:37 +02:00
github-actions[bot]
f20de6f5f1
Merge staging-next into staging 2024-08-31 18:04:19 +00:00
Alyssa Ross
ccf84022b6 lib.platforms.aarch: init 2024-08-31 14:41:25 +02:00
github-actions[bot]
c33b70bb75
Merge staging-next into staging 2024-08-31 12:05:08 +00:00
Alyssa Ross
d4a72a3935 lib.platforms.mesaPlatforms: remove
Mesa is a package like any other.  There's no reason for it to be a
special case with its platforms listed in lib, because if other
packages want to refer to mesa's platforms, they can access the
platforms from the package meta like they would for any other package.
2024-08-31 10:28:31 +02:00
github-actions[bot]
3b85a864c3
Merge staging-next into staging 2024-08-26 18:04:37 +00:00
Ivan Trubach
9ae6726db9 lib/systems: set gcc.arch = "armv6kz", gcc.fpu = "vfpv2" for raspberryPi
>The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2)
https://wiki.debian.org/RaspberryPi#:~:text=The%20CPU%20in%20the%20Raspberry%20Pi,VFP2%29

See also
- https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications
- https://github.com/NixOS/nixpkgs/issues/319036#issuecomment-2232108373
2024-08-26 18:41:06 +02:00
Robert Hensing
b2d208b70d
Merge pull request #324071 from tie/emulator-exec
lib/systems: use execline’s exec instead of runtimeShell
2024-08-25 19:06:15 +02:00
Artturin
c9270f6274
Merge pull request #329964 from Artturin/androidrenamesdk
treewide: Rename android `sdkVer` and `ndkVer`
2024-08-17 19:22:42 +03:00
Tristan Ross
527de075a3 lib.systems: mark windows as having shared libs 2024-08-10 08:34:57 +02:00
Ivan Trubach
4c6e132c7e lib/systems: use execline’s exec instead of runtimeShell 2024-07-30 12:23:31 +03:00
Artturin
35e5943d69 lib.systems: throw if sdkVer or ndkVer are used for android.
Those attrs have been renamed and throwing is the best way to show it,
if we only warned then the user would only get an error like this `error: Unsupported sdk: 33`
from `pkgs/top-level/darwin-packages.nix`.

If someone wants to support multiple NixOS versions then they can simply
set both attrs. (`!args ? androidSdkVersion` is for that)
2024-07-25 23:49:18 +03:00
Artturin
1144d46f95 treewide: Rename android sdkVer and ndkVer
`sdkVer` conflicts with the old `sdkVer`(now `darwinSdkVersion` but that still uses `sdkVer` if set) used by darwin

This shouldn't be an issue but due to `pkgs/development/interpreters/python/cpython/default.nix`
running `lib.filterAttrs (n: v: ! lib.isDerivation v && n != "passthruFun")` on it's inputs (2 of them are darwin only)
the `throw "Unsupported sdk...` in `pkgs/top-level/darwin-packages.nix` will be triggered.

After this change `pkgsCross.armv7a-android-prebuilt.python3.pythonOnBuildForHost` won't fail with
`error: Unsupported sdk: 33`

Issue was bisected to 3cb23cec23
2024-07-25 22:08:49 +03: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
Ilan Joselevich
bf61b8c8fb
lib.systems: Fix setting rust.platform.os for wasm32-unknown-unknown
Previously we would fallback to using `kernel` as the `os` which would
result in using the wrong `os` value (`none`) when actually we want
`unknown`. This seems to be a special case for wasm32-unknown-unknown
and wasm64-unknown-unknown so I extended the if statement to support it.
2024-07-05 19:43:10 +03:00
Florian Klink
641b2f29b6
Merge pull request #319153 from Kranzes/buildRustCrate-wasm
buildRustCrate: add support for compiling to wasm32-unknown-unknown
2024-06-30 14:05:33 +03:00
Ilan Joselevich
957116419d
lib.systems.examples: add wasm32-unknown-none
This system was added to use the nixpkgs cross compilation logic when
compiling to wasm32-unknown-unknown in rust.
2024-06-24 19:27:13 +03:00
Artturin
2cfac74be5
Merge pull request #319139 from NyCodeGHG/android-ndks
android-ndks: add 25, 26 ndks, update default ndk and sdk
2024-06-23 20:39:28 +03:00
Nick Cao
febff2fc72
Merge pull request #316724 from NickCao/riscv-builtin
lib.systems.riscv-multiplatform: linux-kernel config improvements
2024-06-18 17:05:13 -04:00
John Ericson
bab20def47 lib.systems: Default useLLVM to true with OpenBSD too
Not just FreeBSD.
2024-06-18 13:23:58 -04:00
Tristan Ross
ecf6827049
lib.systems.flakeExposed: exclude systems which are not bootstrapped 2024-06-17 16:34:55 -07:00
Marie Ramlow
56d1e7a41b lib.systems.examples: update default android sdk to 33, ndk to 26 2024-06-17 09:53:31 +02:00
Florian Klink
50261c0602 config.rust: update references from rustc
`rustc.config` is called `rust.rustcTarget` now, and
`{rustc -> rust}.platform`.

This is the new way (tm), and is preferred since
https://github.com/NixOS/nixpkgs/pull/271707 -
though the documentation still is outdated, and some expressions in
nixpkgs were using the old interface.

This updates both.
2024-06-13 21:08:48 +03:00
Nick Cao
50a6be5f8b
lib.systems.riscv-multiplatform: drop linux-kernel.extraConfig
SERIAL_OF_PLATFORM has been y in riscv defconfig since 2018

Reference: 33c57c0d3c
2024-06-02 15:33:13 -04:00
Nick Cao
a9116cef2b
lib.systems.riscv-multiplatform: set linux-kernel.preferBuiltin
Like aarch64, riscv platforms require many drivers to be builtin to boot.
2024-06-02 15:31:18 -04:00
Ali Abrar
888dee445d openbsd: init at 7.5 2024-05-26 10:55:56 -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
266cdd7d37 treewide: freebsd13 -> freebsd
Co-authored-by: Alyssa Ross <hi@alyssa.is>
2024-04-30 18:20:23 -04:00
Jared Baur
6421226aa5 lib/systems: add microblaze-embedded
Adds a new target for `pkgsCross` that can be used for building
freestanding code for microblaze targets (e.g. Xilinx PMU firmware).
2024-04-24 19:45:58 -07:00
Johannes Kirschbauer
c0f5f271d1
doc: migrate trivial files to doc-comment format (#299986)
* doc: migrate trivial files to doc-comment format

* fix: revert some comments

* Apply suggestions from code review

Thanks @danielSidhion

Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com>

* Update lib/types.nix

---------

Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com>
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2024-04-04 16:36:07 +02:00
Silvan Mosberger
b803ba5a48
Merge pull request #295374 from philiptaron/issue-208242/lib.systems
lib: use explicit name imports in `lib/systems`
2024-03-25 18:41:46 +01:00
Philip Taron
79ce46fe49
Avoid top-level with ...; in lib/systems/parse.nix 2024-03-19 16:16:44 -07:00
Philip Taron
c02fcc946a
Avoid top-level with ...; in lib/systems/inspect.nix 2024-03-19 16:16:44 -07:00
Philip Taron
07d3270dbc
lib/systems: inherit from lib.systems.inspect.predicates in lib/systems/parse.nix 2024-03-19 16:09:37 -07:00
Philip Taron
af634f14ba
lib/systems: inherit from lib.systems.parse in lib/systems/inspect.nix 2024-03-19 16:09:37 -07:00
Philip Taron
123a2f0fcc
lib/systems: use lib.systems.parse and lib.systems.inspect.predicates instead of re-importing 2024-03-19 16:09:37 -07:00
Philip Taron
5988f8f841
lib.systems: use explicit attrset instead of rec
This allows refactoring in the file without accidentally modifying the
public interface of the file.

Also, pull in symbols consistently from `lib` instead of `builtins`.
2024-03-19 16:09:37 -07:00
Thomas Watson
91ad438400 lib/systems: remove more features from qemu-user
alsaSupport/jackSupport: unnecessary multimedia systems

tpmSupport/capstoneSupport: unlikely to come up as an exe emulator
2024-03-11 20:16:04 -05:00
Raito Bezarius
b62bc38ac9 lib/systems/inspect: add isSparc64
This is useful to distinguish between SPARC64 and SPARC whatever,
because SPARC64 do support compressed kernels.
2024-02-08 05:07:39 +01:00
Adam Joseph
9b4c306d98 lib.system.inspect: add wasm32 to isILP32
According to the WebAssembly design doc, wasm32 is an ILP32 ABI like
x32, mips64n32, and aarch64_ilp32 (Apple Watch).  This commits adds
it to the predicate.

  1319968ca5/CAndC%2B%2B.md (L16)
2024-01-18 09:09:29 +00:00
Ryan Burns
5cbd74e49a lib/systems: add exec format inspection attrs
Most of the time when we do a patchelf conditional on
hostPlatform.isLinux, what we really mean is hostPlatform.isElf.
Now that we are starting to support BSDs, this is becoming more important.
2024-01-02 14:07:20 -08:00
Jeff Huffman
94a3c17582
lib.systems.elaborate: add libDir attribute 2023-12-03 16:23:44 -05:00