mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-27 02:34:53 +00:00
This expands on https://github.com/NixOS/nixpkgs/pull/498928 that introduced __structuredAttrs here by actually using data in `.attrs.json` when it makes sense, instead of relying on environment variables. This reverts commitbf6ada5d78. This reapplies commit691dc02df0.
11 lines
265 B
Python
11 lines
265 B
Python
import json
|
|
import os
|
|
import sys
|
|
from configobj import ConfigObj
|
|
|
|
config = ConfigObj(interpolation=False, encoding="UTF8")
|
|
with open(os.environ["NIX_ATTRS_JSON_FILE"]) as f:
|
|
value = json.load(f).get("value")
|
|
config.update(value)
|
|
config.write(sys.stdout.buffer)
|