| Commit message (Expand) | Author | Age | Files | Lines |
| * | lib.licenses: add bsd1 (BSD 1-Clause License) | Fabian Affolter | 2021-02-02 | 1 | -0/+5 |
| * | Revert "lib/generators: fix toPretty throwing on (partially applied) builtins"•••This reverts commit d9a7d03da8c58aa863911506ae3153729f8931da.
Reason for this is that it actually doesn't migitate the issue on nix
stable for another reason: builtins.tryEval doesn't prevent the error
generated by builtins.functionArgs from halting evaluation:
> builtins.tryEval (builtins.functionArgs builtins.functionArgs)
error: 'functionArgs' requires a function, at (string):1:19
Thus it seems that there is no workaround to make
lib.generators.toPretty work with nix stable and primops since there is
no way to distinguish between primops and lambdas in nix.
| sternenseemann | 2021-02-01 | 1 | -9/+4 |
| * | Merge pull request #111469 from sternenseemann/topretty-fix-currying•••lib/generators: fix toPretty throwing on (partially applied) builtins | Silvan Mosberger | 2021-01-31 | 1 | -4/+9 |
| |\ |
|
| | * | lib/generators: fix toPretty throwing on (partially applied) builtins•••An high level example case of this problem occuring can be found below:
nix-repl> lib.generators.toPretty {} (lib.concatStringsSep "\n")
error: 'functionArgs' requires a function, at /home/lukas/src/nix/nixpkgs/lib/trivial.nix:334:42
However this does not happen on other partially applied functions:
nix-repl> lib.generators.toPretty {} (lib.concatMapStringsSep "\n")
"<function>"
The issue, as it turns out is that while builtins are functions,
builtins.functionArgs throws if is passed a builtin or a partially
applied builtin:
nix-repl> lib.generators.toPretty {} builtins.toString
error: 'functionArgs' requires a function, at /home/lukas/src/nix/nixpkgs/lib/trivial.nix:334:42
nix-repl> lib.generators.toPretty {} (builtins.foldl' (a: b: a + b))
error: 'functionArgs' requires a function, at /home/lukas/src/nix/nixpkgs/lib/trivial.nix:334:42
I'm pretty sure this qualifies as a nix bug and should be filed
accordingly, but we can work around it in lib.generators.toPretty by
using tryEval and falling back to {} which functionArgs _should_ return
for builtins.
The nix behavior is inconsistent to say the least:
nix-repl> builtins.functionArgs builtins.functionArgs
error: 'functionArgs' requires a function, at (string):1:1
nix-repl> builtins.typeOf builtins.functionArgs
"lambda"
builtins.functionArgs (a: 1 + a)
{ }
nix-repl> builtins.typeOf (a: 1 + a)
"lambda"
| sternenseemann | 2021-01-31 | 1 | -4/+9 |
| * | | lib/types: add description for functionTo | Fritz Otlinghaus | 2021-01-31 | 1 | -1/+2 |
| * | | Merge pull request #111345 from r-burns/ppc64-big-endian•••Enable PPC64 (big-endian) | John Ericson | 2021-01-30 | 4 | -3/+26 |
| |\ \ |
|
| | * | | lib.systems: add powerpc64-linux•••PPC64 supports two ABIs: ELF v1 and v2.
ELFv1 is historically what GCC and most packages expect, but this is
changing because musl outright does not work with ELFv1. So any distro
which uses musl must use ELFv2. Many other platforms are moving to ELFv2
too, such as FreeBSD (as of v13) and Gentoo (as of late 2020).
Since we use musl extensively, let's default to ELFv2.
Nix gives us the power to specify this declaratively for the entire
system, so ELFv1 is not dropped entirely. It can be specified explicitly
in the target config, e.g. "powerpc64-unknown-linux-elfv1". Otherwise the
default is "powerpc64-unknown-linux-elfv2". For musl,
"powerpc64-unknown-linux-musl" must use elfv2 internally to function.
| Ryan Burns | 2021-01-30 | 4 | -3/+26 |
| * | | | Merge pull request #110787 from tfc/cartesian-product•••lib/attrsets: add cartesianProductOfSets function | Silvan Mosberger | 2021-01-29 | 4 | -3/+89 |
| |\ \ \
| |_|/
|/| | |
|
| | * | | Deprecate lib.crossLists | Jacek Galowicz | 2021-01-28 | 1 | -1/+3 |
| | * | | lib/attrsets: add cartesianProductOfSets function | Jacek Galowicz | 2021-01-28 | 3 | -2/+86 |
| * | | | gcc: fix armhf target•••Fixes #96921
| Alexander Foremny | 2021-01-29 | 1 | -0/+6 |
| |/ / |
|
| * | | Merge pull request #110707 from Infinisil/functionTo•••Bring back `types.functionTo` | Robert Hensing | 2021-01-27 | 7 | -0/+128 |
| |\ \
| |/
|/| |
|
| | * | lib/tests: More functionTo tests | Silvan Mosberger | 2021-01-27 | 7 | -31/+117 |
| | * | lib/types: Improved functionTo merging•••Now type checks the resulting function values and allows mkMerge and co.
Also indicates that the type check is done in the function body
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
| Silvan Mosberger | 2021-01-27 | 1 | -1/+1 |
| | * | lib/tests/modules: add a test for the functionTo type•••(cherry picked from commit 478af112e83df806bd8a51174834d2a130fbdeb9)
| Bas van Dijk | 2021-01-24 | 2 | -0/+32 |
| | * | Revert "Remove types.functionTo."•••This reverts commit 4ff1ab5a56f1280d2de319ad4eb4b2796e07ed35.
We need this to type options like:
services.xserver.windowManager.xmonad.extraPackages that specify functions that
take an attribute set containing packages / plugins and return a list containing
a selection of the values in this set.
The reason we need a dedicated type for this is to have the correct merge
behaviour. Without the functionTo type merging multiple function option
definitions results in an evaluation error. The functionTo type merges
definitions by returning a new function that applies the functions of all the
definitions to the given input and merges the result.
(cherry picked from commit 7ed41ff5e7e633dd64866398ee497ac02736a3a5)
| Bas van Dijk | 2021-01-24 | 1 | -0/+10 |
| * | | lib/systems: fix linuxArch for power + riscv•••Looks like these got left behind in the
kernelArch -> linuxArch migration.
Fixes:
* pkgsCross.powernv.linuxHeaders
* pkgsCross.riscv64.linuxHeaders
* pkgsCross.riscv32.linuxHeaders
and dependees
| Ryan Burns | 2021-01-25 | 1 | -0/+2 |
| * | | Merge pull request #110672 from Profpatsch/lib-add-traceFnSeqN•••lib/debug: add traceFnSeqN | Silvan Mosberger | 2021-01-25 | 2 | -1/+23 |
| |\ \
| |/
|/| |
|
| | * | lib/debug: add traceFnSeqN•••Immensely helpful when you want to see the changes a function makes to
its value as it passes through.
Example:
```
$ nix-instantiate --strict --eval -E '(with import ./lib; traceFnSeqN 2 "id" (x: x) { a.b.c = 3; })'
trace: {
fn = "id";
from = {
a = {
b = {…};
};
};
to = {
a = {
b = {…};
};
};
}
{ a = { b = { c = 3; }; }; }
```
| Profpatsch | 2021-01-25 | 2 | -1/+23 |
| * | | treewide: fix double quoted strings in meta.description•••Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
| volth | 2021-01-24 | 1 | -2/+2 |
| * | | Merge pull request #100687 from spease/add-newer-xcode-hashes•••darwin: update xcode versions | Matthew Bauer | 2021-01-23 | 1 | -8/+8 |
| |\ \ |
|
| | * \ | Merge branch 'master' into add-newer-xcode-hashes | Steven Pease | 2021-01-19 | 22 | -190/+596 |
| | |\ \ |
|
| | * | | | Update to XCode 12.3 | Steven Pease | 2021-01-19 | 1 | -8/+8 |
| | * | | | Add newer xcode versions | Steven Pease | 2020-10-15 | 1 | -8/+8 |
| * | | | | lib: Clean up how linux and gcc config is specified•••Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that
commit for details.
This reverts commit 0bc275e63423456d6deb650e146120c39c1e0723.
| John Ericson | 2021-01-23 | 4 | -348/+339 |
| | |_|/
|/| | |
|
| * | | | Revert "lib: Clean up how linux and gcc config is specified"•••This is a stdenv-rebuild, and should not be merged
into master
This reverts commit 8929989614589ee3acd070a6409b2b9700c92d65.
| Jonathan Ringer | 2021-01-22 | 3 | -335/+344 |
| * | | | Merge pull request #107214 from Ericson2314/linux-config-cleanup•••lib: Clean up how linux and gcc config is specified | John Ericson | 2021-01-22 | 3 | -344/+335 |
| |\ \ \ |
|
| | * | | | lib: Clean up how linux and gcc config is specified•••The `platform` field is pointless nesting: it's just stuff that happens
to be defined together, and that should be an implementation detail.
This instead makes `linux-kernel` and `gcc` top level fields in platform
configs. They join `rustc` there [all are optional], which was put there
and not in `platform` in anticipation of a change like this.
`linux-kernel.arch` in particular also becomes `linuxArch`, to match the
other `*Arch`es.
The next step after is this to combine the *specific* machines from
`lib.systems.platforms` with `lib.systems.examples`, keeping just the
"multiplatform" ones for defaulting.
| John Ericson | 2021-01-21 | 3 | -344/+335 |
| | | |/
| |/| |
|
| * / | | lib/modules: Set submodule type for renamed option sets•••For renames like
mkAliasOptionModule [ "services" "compton" ] [ "services" "picom" ]
where the target is an option set (like services.picom) instead of a single
option (like services.picom.enable), previously the renamed option type
was unset, leading to it being `types.unspecified`.
This changes it to be `types.submodule {}` instead, which makes more
sense.
| Silvan Mosberger | 2021-01-21 | 1 | -1/+1 |
| |/ / |
|
| * | | Merge pull request #104648 from samueldr/cleanup/kernelMajor•••platforms.nix: Remove now unused kernelMajor | John Ericson | 2021-01-18 | 1 | -8/+0 |
| |\ \ |
|
| | * | | platforms.nix: Remove now unused kernelMajor•••The last use of `kernelMajor` in Nixpkgs was removed in 2018.
Even then, I'm not positive it was actually in an exercised code path.
AFAIUI this is now totally redundant and useless as it really was meant
for the 2.4 -> 2.6 transition.
| Samuel Dionne-Riel | 2020-11-22 | 1 | -8/+0 |
| * | | | Merge pull request #107417 from jtojnar/deprecate-unclear-gpl-licenses•••licenses: Mark unclear GPL licenses explicitly deprecated | Jan Tojnar | 2021-01-01 | 1 | -10/+50 |
| |\ \ \ |
|
| | * | | | licenses: Mark unclear GPL licenses explicitly deprecated•••We recently switched to more explicit GPL license names in line
with the SPDX change and GNU Foundation recommendations:
https://www.gnu.org/licenses/identify-licenses-clearly.html
This followed up older change to use the recommended SPDX ID
https://github.com/NixOS/nixpkgs/commit/18a5e8c36b2681f5fc4aecd79f4cc723365d2d94
but using the `-only` variant for these deprecated licenses too
makes it harder to check for them automatically.
Let’s switch to the appropriate SPDX ID again.
| Jan Tojnar | 2020-12-22 | 1 | -10/+50 |
| * | | | | Merge pull request #107999 from andir/platforms-arm-trusted-platform•••lib/systems/platforms: treat missing cpu version as generic pcBase | John Ericson | 2020-12-31 | 1 | -2/+3 |
| |\ \ \ \ |
|
| | * | | | | lib/systems/platforms: treat missing cpu version as generic pcBase•••Since 40e7be1 all ARM platforms that didn't have a parsed cpu version
(e.g. arm-none-eabi) would be handled as armv7l-hf-multiplatform which
did break building arm-trusted-platform packages for some targets (e.g.
rk3399).
Using pcBase as fallback, instead of armv7l-hf-multiplatform,
corresponds with the behaviour we had before 40e7be1.
| Andreas Rammhold | 2020-12-31 | 1 | -2/+3 |
| * | | | | | lib/systems: add emulator for mmix | Ben Siraphob | 2020-12-31 | 1 | -0/+2 |
| |/ / / / |
|
| * / / / | lib.systems: update processor architecture info | Fabián Heredia Montiel | 2020-12-23 | 1 | -7/+37 |
| |/ / / |
|
| * | | | Merge pull request #97145 from lheckemann/initrd-improvements•••Initrd improvements | Linus Heckemann | 2020-12-18 | 1 | -1/+1 |
| |\ \ \ |
|
| | * | | | lib/systems: fix kernelArch for x86_64•••IA64 (Itanium) is something completely different and certainly not
what we want! x86_64 code lives in arch/x86 just like "classic" x86.
| Linus Heckemann | 2020-12-17 | 1 | -1/+1 |
| * | | | | Revert "Module-builtin assertions, disabling assertions and submodule asserti... | Silvan Mosberger | 2020-12-18 | 13 | -303/+45 |
| * | | | | Merge pull request #97023 from Infinisil/module-assertions•••Module-builtin assertions, disabling assertions and submodule assertions | Silvan Mosberger | 2020-12-18 | 13 | -45/+303 |
| |\ \ \ \ |
|
| | * | | | | lib/modules: Prefix mkRemovedOptionModule & co. check names•••To avoid name clashes
Co-authored-by: Robert Hensing <robert@roberthensing.nl>
| Silvan Mosberger | 2020-12-18 | 1 | -3/+3 |
| | * | | | | lib/modules: Introduce _module.checks.*.check•••Previously the .enable option was used to encode the condition as well,
which lead to some oddness:
- In order to encode an assertion, one had to invert it
- To disable a check, one had to mkForce it
By introducing a separate .check option this is solved because:
- It can be used to encode assertions
- Disabling is done separately with .enable option, whose default can be
overridden without a mkForce
| Silvan Mosberger | 2020-12-17 | 11 | -29/+39 |
| | * | | | | lib/modules: _module.check should always be internal•••Honestly this option should probably just be removed
| Silvan Mosberger | 2020-11-30 | 1 | -8/+9 |
| | * | | | | lib/modules: Remove _module.checks.*.triggerPath as it's not necessary•••Previously this option was thought to be necessary to avoid infinite
recursion, but it actually isn't, since the check evaluation isn't fed
back into the module fixed-point.
| Silvan Mosberger | 2020-11-30 | 6 | -159/+22 |
| | * | | | | lib/modules: Rename _module.assertions to _module.checks | Silvan Mosberger | 2020-11-30 | 14 | -50/+56 |
| | * | | | | lib/tests: Add tests for module-builtin assertions | Silvan Mosberger | 2020-11-30 | 13 | -0/+197 |
| | * | | | | lib/tests: Implement generalized checkConfigCodeOutErr for module tests | Silvan Mosberger | 2020-11-30 | 1 | -21/+34 |
| | * | | | | nixos/modules: Expose the internal module in the top-level documentation | Silvan Mosberger | 2020-11-30 | 2 | -6/+11 |
| | * | | | | nixos/modules: Allow options to be coerced to a string for convenience | Silvan Mosberger | 2020-11-30 | 1 | -0/+2 |