Age | Commit message (Collapse) | Author | Files | Lines |
|
`lib.lists.{hasPrefix,removePrefix}`: init
|
|
lib/modules: Report a good error when option tree has bare type
|
|
`makeScopeWithSplicing`
Right now converting `makeScope` to `makeScopeWithSplicing` is not
transparent to users and requires adding a warning for `overrideScope'`
in the set itself.
Warning and `overrideScope'` were added in 2018 b9dce11712d2bfc8cd367df5a7f737a5cec1e252 and there should be no users left after 5 years.
|
|
Note that this removes the possibility of declaring an option
named `_type`.
|
|
Minor `lib.path` documentation consistency improvements
|
|
These statements are taken from the `lib/test/release.nix` tests,
which previously also worked on darwin.
Unblocks https://github.com/NixOS/nix/pull/8569 when backported
|
|
Change `types.string` error to a warning instead
|
|
|
|
This will cause a poorer error message without option location
information, but it will catch all uses of its use.
|
|
This reverts commit c59c6b1c57da542b6b4af5d2ac27d1b99e7f0c5e.
This was a bit too ambitious, because no warnings were previously
triggered when `string` was nested e.g. `attrsOf string`, `nullOr
string`, etc.
Support for nested type deprecation warnings was introduced in
4b54aedee5e05aaf2838f6d951508b83e33d2baa, but had to be reverted in
a36e6760e9be0ec260b637a06d751d39e2a78e4e because it caused infinite
recursion for some users, and I couldn't remember that it was reverted.
|
|
The type has given a warning on use since [4 years ago](03392cd336b128a1639c648baf0f6c1a1271e0d2), I think it's safe to move the deprecation to the next stage: An error instead of a warning.
|
|
|
|
|
|
- Always have a trailing dot after sentences
- Link more things
- Fix some formatting
- Use `append` instead of `+ ("/"`
|
|
|
|
`lib.path.subpath.components`: init
|
|
lib/tests/modules: Test that _module.args works when a default argume…
|
|
Before this commit, getExe assumes that if `meta.mainProgram` is unset,
it has a main program that's named after the package name.
While this is probable, it leads to a bad error when the assumption does
not hold. If the user called `getExe` themselves, they might narrow down
the location of the assumption quite easily, but if that's not the case,
they'll have to go down the rabbit hole to figure out what went wrong.
For example, a NixOS module may use `lib.getExe` on a package-typed option
which is then used in the system configuration. This then typically leads
to a failure *after* deployment, which is bad, and it's quite likely that
the user will debug the package output contents before digging through the
NixOS module, which is bad.
Furthermore the `getExe` call is rather inconspicuous as it does not
contain something like "/bin/foo", which is bad.
Also modules can be hard to read for a newbie, which is bad.
All of this can be avoided by requiring `meta.mainProgram`.
Many packages already have the attribute, and I would expect 80% of
`getExe` usages to be covered by 20% of packages, because plenty of
packages aren't used with `getExe` anyway.
Finally we could make an effort to set `mainProgram` semi-automatically
using `nix-index`.
|
|
|
|
These are often unneeded by the user.
|
|
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.
|
|
`lib.path.splitRoot`: init
|
|
lib/modules: handle typeless options in mergeModules
|
|
mkOption does not require a `type` argument and does not set the
resulting attribute if it is not given. Consequently, we need to be
prepared to merge options that have no type information.
|
|
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
|
|
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
`lib.lists.{findFirstIndex,commonPrefix}`: init
|
|
lib/generators/toKeyValue: add `indent` parameter
|
|
lib.systems.bluefield2: remove cpu profile
|
|
zsh-abbr: init at 5.1.0
|
|
toKeyValue is generic enough that it is sometimes used as part of other
format generators, where it might be useful to specify the indentation
level.
|
|
|
|
lib.systems.extensions.sharedLibrary: do not `throw`
|
|
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
`lib.path.removePrefix`: init
|
|
Create a Readme in `lib`
|
|
Some software, e.g. systemd, failed to build with set cpu
profile.
Signed-off-by: Markus Theil <theil.markus@gmail.com>
|
|
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
|
|
Co-authored-by: Alexander Groleau <alex@proof.construction>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
|
|
|
|
Add support for Nvidia's Bluefield 2 plattform as a compilation
target. There exists a version with and without crypto support,
while the crypto supported version is the most common one.
Support for the non-crypto version can be easily added in the future,
if needed.
For a datasheet of the hardware, see:
https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/documents/datasheet-nvidia-bluefield-2-dpu.pdf
Signed-off-by: Markus Theil <theil.markus@gmail.com>
|
|
gccCrossStageStatic: enable dynamic libraries, rename it
|
|
|
|
|
|
|
|
|