Commit graph

4,908 commits

Author SHA1 Message Date
Artem Leshchev
fb932783c4 lib.licenses.bzip2: add
The identifier is not versioned, as the version there is an artifact of
an incorrect interpretation of the documentation, other variants are now
deprecated.
2026-03-23 13:14:25 -05:00
Philip Taron
9ff9393b2b
lib.makeScope: allow overriding callPackage (#500752) 2026-03-22 06:03:40 +00:00
Alyssa Ross
1304639262
lib.meta.getLicenseBySpdxId: set spdxId in default value (#500750) 2026-03-20 15:23:17 +00:00
Philip Taron
4085f24e25
lib.makeScope: add tests for callPackage overriding
Test that:
- makeScope provides a default callPackage
- the scope function can override callPackage
- the override persists through overrideScope
2026-03-19 14:11:11 -07:00
Aleksana
c9fdda7d5a
lib/systems: fix qemuArch for aarch64_be (#500620) 2026-03-18 14:06:22 +00:00
quantenzitrone
f08c835bf9
lib.newScope: allow overriding callPackage 2026-03-17 16:30:00 +01:00
sternenseemann
666476ff53 lib.meta.getLicenseBySpdxId: set spdxId in default value
Nixpkgs does not contain an entry in lib.licenses for every SPDX license,
so it is expected that a valid SPDX id would yield no proper result from
getLicenseFromSpdxId. Hence, we should set spdxId in the default value.

Users that think their SPDX ID may be invalid should rather use
getLicenseFromSpdxIdOr.
2026-03-17 16:16:43 +01:00
Amaan Qureshi
e0801cae76
lib/systems: fix qemuArch for aarch64_be
`qemuArch` returned "aarch64" for both LE and BE, causing binfmt to
register `qemu-aarch64` for `aarch64_be` binaries. QEMU ships separate
`qemu-aarch64` and `qemu-aarch64_be` binaries, so the wrong interpreter
was used, failing with "Invalid ELF image for this architecture".

Since QEMU distinguishes endianness in the binary name, this adds the
"_be" suffix via `isBigEndian`, which is similar to the approach MIPS 
uses a few lines below.
2026-03-16 23:49:50 -04:00
cinereal
fe13778496
lib.types: use isType for optionType
Signed-off-by: cinereal <cinereal@riseup.net>
2026-03-14 16:18:56 -07:00
Alyssa Ross
bd0c7ad05a
lib.systems: rust: Make rustcTargetSpec the primary entrypoint (#446668) 2026-03-07 08:22:44 +00:00
Tobias Mayer
4c05f197e6 lib.systems: s/makeMuslParsedPlatform/mkMuslSystem/ 2026-03-06 23:38:09 +01:00
Tristan Ross
3faec18180
lib.systems: expose makeMuslParsedPlatform (#490520) 2026-03-06 16:37:06 +00:00
İlkecan Bozdoğan
6acae46c84 lib: don't inherit unused functions 2026-03-04 00:10:00 +03:00
İlkecan Bozdoğan
e394a579b0 lib: update type signatures
- concrete types start with uppercase: Int, String, Bool, Derivation,
  etc.
- type variables start with lowercase: a, b, etc.
- list:
  - use `[x]` for homogeneous lists instead of `List x` or `[ x ]`
  - use `List` for heterogeneous lists (not that common in `lib`)
- attr:
  - use `AttrSet` for a generic attribute set type
  - use `{ key1 :: Type1; key2 :: Type2; ... }` for adding signatures
    for known attribute names and types
  - use `{ key1 = value1; key2 = value2; ... }` for adding attributes
    with known literals
  - end with an ellipsis (`...`) if the set can contain unknown
    attributes
  - use `{ [String] :: x }` if all the attributes has the same type `x`
- prefer `Any` over `a` if the latter is not reused
2026-03-04 00:10:00 +03:00
İlkecan Bozdoğan
64a8ada54e lib: add type signature to some of the functions 2026-03-02 15:46:43 +00:00
John Ericson
704e1a5c16
lib.systems: add uefi support (#477645) 2026-03-02 05:32:37 +00:00
dramforever
60ac986e49 lib.systems: rust: Make rustcTargetSpec the primary entrypoint
Make rustcTargetSpec the primary entrypoint for setting a custom target,
and wire up all the other stuff so they are hopefully as working and as
broken as before.

In particular, to specify a custom target, the user now just specifies
rust.rustcTargetSpec. rust.platform and rust.cargoShortTarget are
populated from rust.rustcTargetSpec now. In addition, rust.rustcTarget
defaults to rust.cargoShortTarget. (rust.rustcTarget and
rust.cargoShortTarget really should always be the same, but I think we
can deal with that later).

This allows the user to more easily control the basename of
rust.rustcTargetSpec by passing e.g.
"${./rust}/mips64el_mips3-unknown-linux-gnuabi64.json", which allows
cc-rs and in turn std to work.
2026-02-27 13:34:31 +08:00
dramforever
550a1b8eb5 lib.systems: Refactor rust.platform generation
In preparation for a future commit, refactor rust.platform somewhat.

No functional changes intended. Most of the diff here is whitespace
changes.
2026-02-25 11:18:23 +08:00
Tom Hunze
7d233ecede
lib.licenses.tsl: fix typo in fullName 2026-02-18 17:52:45 +01:00
Silvan Mosberger
9895f5057d
lib.maintainers: Require uniqueness of github[Id], email and matrix fields (#488851) 2026-02-16 20:57:43 +00:00
Tobias Mayer
4cd3967a68 lib.systems: expose makeMuslParsedPlatform
Moving this helper from pkgs/stdenv/stage.nix so it can be used
for alternative variations of pkgsMusl and pkgsStatic.
2026-02-14 23:09:33 +01:00
Alexandre Esteves
4255fb08c9 lib.systems: fix path to wine executable 2026-02-10 20:16:44 +00:00
piegames
09511292b0
lib: fix broken string escapes in doc comments (#486608) 2026-02-10 13:49:42 +00:00
Silvan Mosberger
b54233e11c lib.maintainers: Enforce unique github[Id], email, matrix 2026-02-09 21:51:01 +01:00
nixpkgs-ci[bot]
c0bf6b8395
Merge master into staging-nixos 2026-02-04 00:22:54 +00:00
Silvan Mosberger
58b187378d
lib/modules: add suggestions to invalid option name errors (#442263) 2026-02-03 19:10:35 +00:00
quantenzitrone
47124583fc
lib: fix broken string escapes in doc comments 2026-02-03 18:04:11 +01:00
Alyssa Ross
95c8d1ec1e
lib/systems/platforms: Add ppc64; linux: Add 64-bit POWER settings, strip vmlinux kernels (#447752) 2026-02-02 12:10:28 +00:00
nixpkgs-ci[bot]
98a177a424
Merge master into staging-nixos 2026-01-28 12:09:43 +00:00
Theo Paris
9f605ca95e
lib.systems: add uefi support
Signed-off-by: Theo Paris <theo@theoparis.com>
Change-Id: I51ce15449fc83f0ff39277d7cde7b34a6a6a6964

lib.systems: remove i686-uefi
2026-01-25 21:59:21 -08:00
Alexandre Esteves
03a5813e98 lib/systems: Add nodejs as emulator for pkgsCross.ghcjs 2026-01-25 23:16:19 +00:00
Michael Daniels
006ecdbdeb
treewide: fix typos (#479869) 2026-01-24 21:36:44 +00:00
Niclas Overby
7b16ea8b4e lib: re-export missing pure builtins in lib 2026-01-24 11:10:58 +01:00
Johannes Kirschbauer
c6578a37be
lib: re-export missing builtins in lib (#482743) 2026-01-23 09:34:19 +00:00
Dyego Aurélio
28096cc5e3 treewide: apply nixfmt 1.2.0 2026-01-22 18:37:56 -03:00
Mikalai Seva
cb9cd986c9 lib: re-export missing builtins in lib
Closes #369215
2026-01-22 18:54:30 +01:00
Fabián Heredia Montiel
82c1a79c43
Merge remote-tracking branch 'origin/master' into staging-next 2026-01-22 10:40:19 -06:00
Johannes Kirschbauer
04c56b7e59
lib.lists.replaceElemAt: init (#477775) 2026-01-22 15:58:28 +00:00
OPNA2608
2a6945e553 lib/systems/platforms: Drop powernv extraConfig
Settings are covered by ppc64 changes in common-config.
2026-01-22 15:41:33 +01:00
OPNA2608
3e6bae2fa4 lib/systems/platforms: Add ppc64 2026-01-22 15:40:36 +01:00
nixpkgs-ci[bot]
bf69762f2a
Merge master into staging-next 2026-01-21 00:19:20 +00:00
Johannes Kirschbauer
f4d45cdced
lib/types: add tests for types.mkStructuredType 2026-01-20 21:26:05 +01:00
Johannes Kirschbauer
53b47eb93d
lib/tests: add strict option to checkConfigOutput 2026-01-20 21:26:05 +01:00
Johannes Kirschbauer
c988f82f7a
lib/types: add types.{json,toml} from pkgs.formats 2026-01-20 21:26:05 +01:00
nixpkgs-ci[bot]
c95fc42eb1
Merge master into staging-next 2026-01-20 00:18:19 +00:00
Valentin Gagarin
638ff75ea2
lib.literalExpression: tag generated code blocks with nix, add usage example and describe function arg; lib.literalCode: init (#467878) 2026-01-19 18:39:21 +00:00
nixpkgs-ci[bot]
33adae5a01
Merge master into staging-next 2026-01-19 18:06:39 +00:00
Johannes Kirschbauer
38cab2baa2
lib/types: unify public attribute set and ast 2026-01-19 13:24:05 +01:00
nixpkgs-ci[bot]
db8a4e9f0b
Merge master into staging-next 2026-01-15 18:09:05 +00:00
John Ericson
3ea6894af1
Add clang64 toolchain to pkgsCross (#450796) 2026-01-15 14:49:16 +00:00