tvl-depot/tvix/serde/examples/foods.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
414 B
Nix
Raw Normal View History

# This is content for the `Data` struct, written in intentionally
# convoluted Nix code.
let
mkFlavour = flavour: name: {
inherit name;
value = flavour;
};
tasty = mkFlavour "Tasty";
okay = mkFlavour "Okay";
eww = mkFlavour "Eww";
in
{
name = "exhaustive list of foods";
foods = builtins.listToAttrs [
(tasty "beef")
(okay "tomatoes")
(eww "olives")
(tasty "coffee")
];
}