mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
getNameFromURL(): Support uppercase characters in attribute names
In particular, this makes it handle 'legacyPackages' correctly.
This commit is contained in:
parent
d65d56fa77
commit
936a364226
2 changed files with 6 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
static const std::string attributeNamePattern("[a-z0-9_-]+");
|
||||
static const std::string attributeNamePattern("[a-zA-Z0-9_-]+");
|
||||
static const std::regex lastAttributeRegex("(?:" + attributeNamePattern + "\\.)*(?!default)(" + attributeNamePattern +")(\\^.*)?");
|
||||
static const std::string pathSegmentPattern("[a-zA-Z0-9_-]+");
|
||||
static const std::regex lastPathSegmentRegex(".*/(" + pathSegmentPattern +")");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue