mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-14 20:56:37 +00:00
14 lines
398 B
Nix
14 lines
398 B
Nix
# Converts an attr list to the text file format used by Math Symbols Input.
|
||
# for example, the following command attribute set
|
||
#
|
||
# {"alpha" = "α"; "beta" = "β";}
|
||
#
|
||
# would be converted to
|
||
#
|
||
# \alpha α
|
||
# \beta β
|
||
#
|
||
{ writeText, lib }:
|
||
commands:
|
||
writeText "custom-commands.txt" (builtins.concatStringsSep "\n"
|
||
(lib.attrsets.mapAttrsToList (name: value: "\\${name} ${value}") commands))
|