Match more liberally in Package-Requires lists

This commit is contained in:
Steve Purcell 2020-06-20 15:50:07 +12:00
parent 8439afbe1e
commit 1b7520aab8

View file

@ -12,11 +12,11 @@ let
requires =
lib.concatMapStrings
(line:
let match = builtins.match "^;;;* *[pP]ackage-[rR]equires *: *\\((.*)\\)" line;
let match = builtins.match ";;;* *[pP]ackage-[rR]equires *: *\\((.*)\\) *" line;
in if match == null then "" else builtins.head match)
lines;
parseReqList = s:
let matchAndRest = builtins.match " *\\(? *([^ \"\\)]+)( +\"[^\"]+\" *\\))?(.*)" s;
let matchAndRest = builtins.match " *\\(? *([^ \"\\)]+)( +\"[^\"]+\" *\\)| *\\))?(.*)" s;
in
if isStrEmpty s then
[ ]