Age | Commit message (Collapse) | Author | Files | Lines |
|
no longer supported. warning when used would not be appropriate, and
docbook has been on the way out for long enough that throwing an error
should not be necessary either.
|
|
These functions only work with the filesystem, they don't import
anything as sources
|
|
- provide comprehensive example
- add unit test
|
|
all of these have been deprecated and raising warnings since 18.09. it's
about time we actually made good on "will be removed in the next release".
|
|
|
|
lib.lists: add `replicate`
|
|
`replicate` returns n copies of an element as a list.
Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
|
|
lib/strings: add `concatLines`
|
|
lib: Fix mismatched quotes in `lib.*` doc comments
|
|
another transitional option factory, like mkAliasOptionModuleMD.
|
|
mkAliasOptionModule should not default to mdDoc descriptions because
that can break out-of-tree users of documentation infrastructure. add an
explicitly-MD variant for now, to be removed some time after the MD
transition is complete.
|
|
lib.path.subpath.{isValid,normalise}: init
|
|
The first path library function
|
|
caused problems for automated rich text generation such as
https://teu5us.github.io/nix-lib.html#customisation-functions
|
|
|
|
Available since Nix 2.3, which is the Nixpkgs minimum version.
Thanks zimbatm!
|
|
Like `unlines` from Haskell.
The aim is to replace the `concatStringsSep "\n"` pattern for generated
files, which doesn't add a final newline.
|
|
To bring them to the scope when calling `lib`.
|
|
|
|
|
|
|
|
|
|
|
|
lib: add inPureEvalMode
|
|
heavily based on patterns used by licenses infrastructure, so may
appear overengineered for its initial level of use
|
|
This reverts commit PR #167947.
Flakes aren't standardised and the `lib` namespace shouldn't be
polluted with utilities that serve only experimental uses.
|
|
This makes a value that is true if builtins does not contain the
currentSystem function, but false if it does.
|
|
lib: add callLocklessFlake
|
|
lib/strings: add toShellVars
|
|
A straightforward piece of plumbing to safely inject Nix variables into
shell scripts:
''
${lib.toShellVars { inherit foo bar; }}
cmd "$foo" --bar "$bar"
''
|
|
|
|
This commit creates flakes.nix, which is a library containing functions
which relate to interacting with flakes. It also moves related functions
from trivial.nix into it.
|
|
This is essentially a copy of the function of the same name, from
flake-compat. callLocklessFlake is useful when trying to utilise a
flake.nix without a lock file, often for when you want to create a
subflake from within a parent flake.
Co-authored-by: Tom Bereknyei <tomberek@gmail.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
Stop premature warnings, including `nix.settings` migration
|
|
|
|
|
|
Adds support for sinceRelease
|
|
lib: add mkPackageOption to default.nix
|
|
this was forgotten in #155669
|
|
Wraps a module with a default location for reporting errors.
|
|
Couldn't extend types.uniq and it had a silly name anyway.
Now we can have better error messages.
|
|
|
|
|
|
Move function spdxLicense, internally used in yarn2nix
to lib/meta.nix, and
rename to getLicenseFromSpdxId
A similar function is implemented in poetry2nix,
but the one originally in yarn2nix seems beter.
since it falls back to an license-like attrset
for mismatched case
instead of a plain string
|
|
mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b
Create config definitions with the same priority as the definition of another option.
This should be used for option definitions where one option sets the value of another as a convenience.
For instance a config file could be set with a `text` or `source` option, where text translates to a `source`
value using `mkDerivedConfig options.text (pkgs.writeText "filename.conf")`.
It takes care of setting the right priority using `mkOverride`.
|
|
nixos/doc: clean up defaults and examples
|