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
41
pkgs/build-support/rust/fetch-cargo-tarball/cargo-vendor-normalise.py
Executable file
41
pkgs/build-support/rust/fetch-cargo-tarball/cargo-vendor-normalise.py
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
import toml
|
||||
|
||||
|
||||
def quote(s: str) -> str:
|
||||
escaped = s.replace('"', r"\"").replace("\n", r"\n").replace("\\", "\\\\")
|
||||
return '"{}"'.format(escaped)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
data = toml.load(sys.stdin)
|
||||
|
||||
assert list(data.keys()) == ["source"]
|
||||
|
||||
# this value is non deterministic
|
||||
data["source"]["vendored-sources"]["directory"] = "@vendor@"
|
||||
|
||||
lines = []
|
||||
inner = data["source"]
|
||||
for source, attrs in sorted(inner.items()):
|
||||
lines.append("[source.{}]".format(quote(source)))
|
||||
if source == "vendored-sources":
|
||||
lines.append('"directory" = "@vendor@"\n')
|
||||
else:
|
||||
for key, value in sorted(attrs.items()):
|
||||
attr = "{} = {}".format(quote(key), quote(value))
|
||||
lines.append(attr)
|
||||
lines.append("")
|
||||
|
||||
result = "\n".join(lines)
|
||||
real = toml.loads(result)
|
||||
assert real == data, "output = {} while input = {}".format(real, data)
|
||||
|
||||
print(result)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue