| Commit message (Expand) | Author | Age | Files | Lines |
| ... | |
| | * | lib.strings: fix negative number handling for `toInt` and `toIntBase10`•••The previous version would be unstable due to an input validation regex
not expecting a '-' in front of the number.
| h7x4 | 2022-12-10 | 1 | -6/+7 |
| * | | Merge pull request #204087 from ncfavier/splitString-simplify | Naïm Favier | 2022-12-08 | 1 | -6/+4 |
| |\ \ |
|
| | * | | lib/strings: simplify `splitString`•••There's no need to use `unsafeDiscardStringContext` since
https://github.com/NixOS/nix/commit/ee7fe64c0ac00f2be11604a2a6509eb86dc19f0a
(Nix 1.8).
Also the separator can't have a context since `builtins.split` would fail, so
we can assume it doesn't.
| Naïm Favier | 2022-12-02 | 1 | -6/+4 |
| | |/ |
|
| * / | lib/strings.nix: add mesonOption utility function•••And some friends, to help write Meson commandline invocations.
| AndersonTorres | 2022-12-06 | 1 | -0/+55 |
| |/ |
|
| * | Merge pull request #173949 from jacoblambda/fix-toInt-zero-padding•••lib: add strings.toIntBase10 to parse zero-padded strings | Robert Hensing | 2022-10-24 | 1 | -6/+87 |
| |\ |
|
| | * | lib/strings: Update docs and restructured code to improve readability of toIn... | Jacob Abel | 2022-10-23 | 1 | -21/+37 |
| | * | lib/strings: Improve error message for octal ambiguity in toInt | Jacob Abel | 2022-10-23 | 1 | -3/+2 |
| | * | lib/strings: Refactor toInt into toInt and toIntBase10 | Jacob Abel | 2022-10-23 | 1 | -3/+51 |
| | * | lib/strings: Update toInt to handle intermixed ws and zeros. Added tests | Jacob Abel | 2022-10-23 | 1 | -7/+13 |
| | * | lib/strings: allow toInt to parse zero-padded strings | Jacob Abel | 2022-10-23 | 1 | -4/+16 |
| * | | lib.normalizePath: the empty string is not a valid regex on darwin•••presumably due to using libc++'s regex lib instead of libstdc++ on linux
Fixes https://github.com/NixOS/nixpkgs/pull/177273#issuecomment-1287562800
| Guillaume Girol | 2022-10-24 | 1 | -1/+1 |
| |/ |
|
| * | lib.strings: Add normalizePath•••dedupes extranous /'s in filepaths
Co-authored-by: Daniel Olsen <daniel.olsen99@gmail.com>
| ajs124 | 2022-10-20 | 1 | -0/+10 |
| * | lib.strings: Add function to do C-style escaping | Daniel Olsen | 2022-10-20 | 1 | -0/+13 |
| * | lib.strings: Add function to convert character to number | Daniel Olsen | 2022-10-20 | 1 | -0/+15 |
| * | lib/strings/toShellVars: handle derivations as strings | Naïm Favier | 2022-05-07 | 1 | -4/+5 |
| * | lib/strings: convert to string within hasInfix•••This should fix the issue mentioned here:
https://github.com/NixOS/nixpkgs/pull/168175#issuecomment-1107830574
| Daniel Thwaites | 2022-05-01 | 1 | -1/+1 |
| * | lib/strings: fix quoting of example•••Co-authored-by: Silvan Mosberger <github@infinisil.com> | Naïm Camille Favier | 2022-04-27 | 1 | -1/+1 |
| * | 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"
''
| Naïm Favier | 2022-04-27 | 1 | -0/+60 |
| * | lib/strings: optimise hasInfix function (#168175)•••* lib/strings: optimise hasInfix function
* lib/strings: optimise hasInfix further using regex
* rstudio: call hasInfix with a string
* lib/strings: remove let from hasInfix
Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
Co-authored-by: pennae <82953136+pennae@users.noreply.github.com> | Daniel Thwaites | 2022-04-22 | 1 | -4/+1 |
| * | Merge pull request #166383 from hercules-ci/always-sanitize-derivation-name•••Always sanitize derivation name | Robert Hensing | 2022-04-05 | 1 | -1/+8 |
| |\ |
|
| | * | lib.sanitizeDerivationName: Simplify regex•••`^` and `$` are implicit in `match`.
| Robert Hensing | 2022-04-05 | 1 | -1/+1 |
| | * | lib.sanitizeDerivationName: Optimize the common case | Robert Hensing | 2022-03-31 | 1 | -1/+8 |
| * | | lib/strings: Add levenshtein distance functions•••Adds some functions related to string similarity:
- lib.strings.commonPrefixLength
- lib.strings.commonSuffixLength
- lib.strings.levenshtein
- lib.strings.levenshteinAtMost
| Silvan Mosberger | 2022-04-01 | 1 | -0/+127 |
| |/ |
|
| * | lib: fix escapeXML example in documentation•••The previous example output was forgotten copy-paste from some other
function.
| Robert Helgesson | 2021-11-02 | 1 | -1/+1 |
| * | lib: add function escapeXML•••Given a string, this function returns a string that can be inserted
verbatim in an XML document.
| Robert Helgesson | 2021-10-03 | 1 | -0/+13 |
| * | lib/strings: fix infinite recursion on concatStringsSep fallback•••The current implementation of the concatStringsSep fallback references
concatStrings whcih is just a partial application of concatStringsSep,
forming a circular dependency. Although this will almost never be
encountered as (assuming the user does not explicitly trigger it):
1. the or operator will short circuit both in lazy and strict
evaluation
2. this can only occur in Nix versions prior to 1.10
which is not compatible with various nix operations as of 2.3.15
However it is still important if scopedImport is used or the builtins
have been overwritten. lib.foldl' is used instead of builtins.foldl'
as the foldl' primops was introduced in the same release as concatStringsSep.
| polykernel | 2021-08-26 | 1 | -1/+1 |
| * | strings.nix: Fix overly monomorphic type signature comments•••These functions work on lists of anything, not just lists of strings. | Niklas Hambüchen | 2021-07-04 | 1 | -2/+2 |
| * | lib/strings: forbid lists in isStorePath•••When a list is passed to isStorePath this is most likely a mistake and
it is therefore better to just return false. There is one case where
this theoretically makes sense (if a list contains a single element for
which isStorePath elem), but since that case is also probably seldomly
intentional, it may save someone from debbuging unclear evaluation
errors.
| sternenseemann | 2021-05-07 | 1 | -1/+1 |
| * | lib/strings: fix example for isStorePath•••Since it checks if dirOf x is the nix store dir, a trailing slash will
break this check and make it return false.
| sternenseemann | 2021-05-07 | 1 | -1/+1 |
| * | lib: fix documented type of fixedWidthString (#121396) | Lennart Spitzner | 2021-05-01 | 1 | -1/+1 |
| * | treewide: use lib.warnIf where appropriate | Alyssa Ross | 2021-04-28 | 1 | -2/+2 |
| * | lib/string: drop redundant string in description of toInt.•••Describing the string argument as a string is redundant and not needed
to describe what this function does.
| Alex Brandt | 2020-12-05 | 1 | -1/+1 |
| * | lib/strings: fix typo in example•••The example refers to a snake_case function name but Nix uses camelCase
function names. This ensures the example is correct for the given
function.
| Alex Brandt | 2020-12-04 | 1 | -2/+2 |
| * | lib/strings: fix examples for enableFeatureAs•••The As was missing in the examples on this library function. This will
ensure the examples refer to the function they document.
| Alex Brandt | 2020-12-03 | 1 | -2/+2 |
| * | Merge pull request #44928 from vcunat/p/configure-assert•••lib/strings: guard against an easy mistake | Eelco Dolstra | 2020-11-11 | 1 | -2/+6 |
| |\ |
|
| | * | lib/strings: guard against an easy mistake•••This would catch the bad `fwknop` flags fixed in 580cab57e4,
during evaluation already.
| Vladimír Čunát | 2018-08-12 | 1 | -2/+6 |
| * | | lib: Use Nix's static scope checking, fix error message, optimize•••Nix can perform static scope checking, but whenever code is inside
a `with` expression, the analysis breaks down, because it can't
know statically what's in the attribute set whose attributes were
brought into scope. In those cases, Nix has to assume that
everything works out.
Except it doesnt. Removing `with` from lib/ revealed an undefined
variable in an error message.
If that doesn't convince you that we're better off without `with`,
I can tell you that this PR results in a 3% evaluation performance
improvement because Nix can look up local variables by index.
This adds up with applications like the module system.
Furthermore, removing `with` makes the binding site of each
variable obvious, which helps with comprehension.
| Robert Hensing | 2020-10-22 | 1 | -21/+43 |
| * | | lib.splitString: use builtin.split | Etienne Laurin | 2020-10-18 | 1 | -21/+14 |
| * | | lib/strings: deprecate readPathsFromFile•••> NOTE: This function is not performant and should be avoided.
It's not used at all in-tree now, so we can remove it completely after
any remaining users are given notice.
| V | 2020-09-03 | 1 | -8/+9 |
| * | | lib/strings: Add floatToString | Silvan Mosberger | 2020-07-25 | 1 | -0/+16 |
| * | | lib/strings: Introduce escapeNixIdentifier | Silvan Mosberger | 2020-04-13 | 1 | -0/+15 |
| * | | Merge pull request #83241 from Infinisil/valid-drv-name•••lib/strings: Add `sanitizeDerivationName` function | Silvan Mosberger | 2020-04-02 | 1 | -0/+32 |
| |\ \ |
|
| | * | | lib/strings: Add sanitizeDerivationName function | Silvan Mosberger | 2020-03-30 | 1 | -0/+32 |
| * | | | Revert "Revert "Merge master into staging-next""•••In 87a19e9048773d5a363679617406ad148d36c3b8 I merged staging-next into master using the GitHub gui as intended.
In ac241fb7a570d6cf81d229ad22a8889602639160 I merged master into staging-next for the next staging cycle, however, I accidentally pushed it to master.
Thinking this may cause trouble, I reverted it in 0be87c79797a5fa384fbc356c74ed54f9f7829ea. This was however wrong, as it "removed" master.
This reverts commit 0be87c79797a5fa384fbc356c74ed54f9f7829ea.
| Frederik Rietdijk | 2020-02-05 | 1 | -1/+1 |
| * | | | Revert "Merge master into staging-next"•••I merged master into staging-next but accidentally pushed it to master.
This should get us back to 87a19e9048773d5a363679617406ad148d36c3b8.
This reverts commit ac241fb7a570d6cf81d229ad22a8889602639160, reversing
changes made to 76a439239eb310d9ad76d998b34d5d3bc0e37acb.
| Frederik Rietdijk | 2020-02-05 | 1 | -1/+1 |
| * | | | lib/strings: fix comment typo | Robert Helgesson | 2020-02-05 | 1 | -1/+1 |
| |/ / |
|
| * | | lib: Add getName to mirror getVersion | John Ericson | 2019-11-24 | 1 | -0/+17 |
| * | | Doc fix: use correct function name in type signature for concatIMapStringsSep | Nathan van Doorn | 2019-03-18 | 1 | -1/+1 |
| * | | lib.makePerlPath -> perlPackages.makePerlPath | volth | 2018-12-15 | 1 | -20/+0 |
| * | | make-derivation: use pname-version as default name if both are present | Patrick Hilhorst | 2018-11-06 | 1 | -0/+20 |