@@ -63,18 +63,17 @@ let
6363 stripAnyPrefixes = lib.flip (lib.fold lib.removePrefix) prefixesToStrip;
6464
6565 # Custom "less" that pushes up all the things ending in ".enable*"
66− # and ".package"
67− optionListLess = a: b:
66+ # and ".package*"
67+ optionLess = a: b:
6868 let
69− splt = lib.splitString ".";
7069 ise = lib.hasPrefix "enable";
7170 isp = lib.hasPrefix "package";
7271 cmp = lib.splitByAndCompare ise lib.compare
7372 (lib.splitByAndCompare isp lib.compare lib.compare);
74− in lib.compareLists cmp (splt a) (splt b) < 0;
73+ in lib.compareLists cmp a.loc b.loc < 0;
7574
7675 # Customly sort option list for the man page.
77− optionsList = lib.sort (a: b: optionListLess a.name b.name) optionsListDesc;
76+ optionsList = lib.sort optionLess optionsListDesc;
7877
7978 # Convert the list of options into an XML file.
8079 optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList);