{pkgs ? import {}}: let # Initialize formatters yamlFormat = pkgs.formats.yaml {}; jsonFormat = pkgs.formats.json {}; tomlFormat = pkgs.formats.toml {}; iniFormat = pkgs.formats.ini {}; # Example configuration data exampleConfig = { server = { host = "localhost"; port = 8080; }; database = { url = "postgres://user:pass@localhost/db"; maxConnections = 100; }; logging = { level = "info"; file = "/var/log/app.log"; }; }; # Generate files with each formatter yamlFile = yamlFormat.generate "config.yaml" exampleConfig; jsonFile = jsonFormat.generate "config.json" exampleConfig; tomlFile = tomlFormat.generate "config.toml" exampleConfig; iniFile = iniFormat.generate "config.ini" exampleConfig; in pkgs.runCommand "formatter-examples" {} '' mkdir -p $out cp ${yamlFile} $out/config.yaml cp ${jsonFile} $out/config.json cp ${tomlFile} $out/config.toml cp ${iniFile} $out/config.ini # Create a simple script to display the files mkdir -p $out/bin cat > $out/bin/show-configs <