def mas_nix

near-v-framework@0.4.0.0 · domain/architecture/system/deployment/nix_darwin/brew/ops.bend:82

import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/brew/ops.bend as Ops
import Base
import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/brew/type.bend as Br

82# masApps is an attribute set: an app name the list repeats gets its id added.
83def mas_nix(b: Br.Brew, +names: List<&2, String>) -> String:
84  match b:
85    case Br.Mas{+n, +id}:
86      " " ++ nix_str(Bool.pick(String, Nat.is_gt(occurrences(names, n), 1n), n ++ " (" ++ id ++ ")", n)) ++ " = " ++ id ++ ";"
87    case _:
88      ""

Uses (8)

Used by (1)