uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
27
nixos/lib/make-options-doc/sortXML.py
Normal file
27
nixos/lib/make-options-doc/sortXML.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import xml.etree.ElementTree as ET
|
||||
import sys
|
||||
|
||||
tree = ET.parse(sys.argv[1])
|
||||
# the xml tree is of the form
|
||||
# <expr><list> {all options, each an attrs} </list></expr>
|
||||
options = list(tree.getroot().find('list'))
|
||||
|
||||
def sortKey(opt):
|
||||
def order(s):
|
||||
if s.startswith("enable"):
|
||||
return 0
|
||||
if s.startswith("package"):
|
||||
return 1
|
||||
return 2
|
||||
|
||||
return [
|
||||
(order(p.attrib['value']), p.attrib['value'])
|
||||
for p in opt.findall('attr[@name="loc"]/list/string')
|
||||
]
|
||||
|
||||
options.sort(key=sortKey)
|
||||
|
||||
doc = ET.Element("expr")
|
||||
newOptions = ET.SubElement(doc, "list")
|
||||
newOptions.extend(options)
|
||||
ET.ElementTree(doc).write(sys.argv[2], encoding='utf-8')
|
||||
Loading…
Add table
Add a link
Reference in a new issue