diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-12-22 16:35:58 +0100 |
---|---|---|
committer | Qyriad <qyriad@qyriad.me> | 2024-05-02 12:02:28 -0600 |
commit | ce70f02aff058c6438119e9946122f86431151f1 (patch) | |
tree | cdd89bc83d5e11a665079e5e1c54b5efaa1ae04a /src/libutil | |
parent | e98fc952a81f89c86e871120aac6272dccdc83b9 (diff) |
getNameFromURL(): Support uppercase characters in attribute names
In particular, this makes it handle 'legacyPackages' correctly.
(cherry picked from commit 936a3642264ac159f3f9093710be3465b70e0e89)
Upstream-PR: https://github.com/NixOS/nix/pull/9657
Change-Id: Icc4efe02f7f8e90a2970589f72fd3d3cd4418d95
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/url-name.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/url-name.cc b/src/libutil/url-name.cc index 6ef58c80a..7c526752c 100644 --- a/src/libutil/url-name.cc +++ b/src/libutil/url-name.cc @@ -5,7 +5,7 @@ namespace nix { -static std::string const attributeNamePattern("[a-z0-9_-]+"); +static std::string const attributeNamePattern("[a-zA-Z0-9_-]+"); static std::regex const lastAttributeRegex("(?:" + attributeNamePattern + "\\.)*(?!default)(" + attributeNamePattern +")(\\^.*)?"); static std::string const pathSegmentPattern("[a-zA-Z0-9_-]+"); static std::regex const lastPathSegmentRegex(".*/(" + pathSegmentPattern +")"); |