diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-10-08 17:21:34 -0700 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2022-10-08 17:21:34 -0700 |
commit | 7ef71cd21f45c9b22fc0ab8e75dad78fa8851f94 (patch) | |
tree | ba5185b3ccf3b1cfecfacae923e6e75838ae60a0 /src/libexpr | |
parent | dc205c75a24f4159ef92905b08cb59179d78c345 (diff) |
src/libexpr/primops.cc: parseDrvName: make documentation follow implementation
The documentation for `parseDrvName` does not agree with the implementation when
the derivation name contains a dash which is followed by something that is
neither a letter nor a digit. This commit corrects the documentation to agree
with the implementation.
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 28b998474..840bfecef 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -3821,8 +3821,8 @@ static RegisterPrimOp primop_parseDrvName({ .args = {"s"}, .doc = R"( Split the string *s* into a package name and version. The package - name is everything up to but not including the first dash followed - by a digit, and the version is everything following that dash. The + name is everything up to but not including the first dash not followed + by a letter, and the version is everything following that dash. The result is returned in a set `{ name, version }`. Thus, `builtins.parseDrvName "nix-0.12pre12876"` returns `{ name = "nix"; version = "0.12pre12876"; }`. |