Files
nixpkgs/pkgs/pkgs-lib/formats/configobj/default.nix
Yuriy Taraday efdeeebcb9 Reapply "pkgs-lib/formats: Use .attrs.json where possible"
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 commit bf6ada5d78.
This reapplies commit 691dc02df0.
2026-06-23 22:01:42 +02:00

33 lines
571 B
Nix

{
lib,
pkgs,
}:
let
inherit (lib.types)
serializableValueWith
;
in
{
format =
{ }:
{
type = serializableValueWith { typeName = "ConfigObj mapping"; };
generate =
name: value:
pkgs.runCommandLocal name
{
nativeBuildInputs = [
(pkgs.python3.withPackages (ps: [ ps.configobj ]))
];
inherit value;
__structuredAttrs = true;
strictDeps = true;
}
''
python3 ${./generate.py} > "$out"
'';
};
}