|
83 | 83 | pkgs.coreutils |
84 | 84 | ]; |
85 | 85 | text = '' |
86 | | - if [ "$#" -eq 0 ]; then |
87 | | - set -- nix/tools/*/bun.lock |
88 | | - fi |
89 | | - for lockfile in "$@"; do |
| 86 | + for lockfile in nix/tools/*/bun.lock; do |
90 | 87 | toolDir="$(dirname "$lockfile")" |
91 | 88 | echo "Regenerating $toolDir" |
92 | 89 | (cd "$toolDir" && bun2nix -o bun.nix) |
|
125 | 122 | "rust/crates/ccusage-core/src/models-dev-pricing.json" |
126 | 123 | "rust/crates/ccusage-core/src/models-dev-catalog-rules.json" |
127 | 124 | "rust/adapters/codex/src/codex-auto-review-fallbacks.json" |
128 | | - "nix/tools/*/bun.lock" |
129 | 125 | ]; |
130 | 126 |
|
131 | 127 | # The tagpr PR template is a Go text/template, and oxfmt's markdown |
|
134 | 130 | # `bun.lock`/`bun.nix` under nix/tools are regenerated verbatim by `bun |
135 | 131 | # install` and `bun2nix`. Formatting them fights the generators: oxfmt |
136 | 132 | # rewrites the JSONC lockfile, and deadnix strips the unused arguments |
137 | | - # that bun.nix's `callPackage` signature requires. `bun.lock` stays |
138 | | - # visible to the bun-nix formatter, which derives `bun.nix` from it. |
| 133 | + # that bun.nix's `callPackage` signature requires. |
139 | 134 | settings.global.excludes = [ |
140 | 135 | ".github/tagpr-template.md" |
| 136 | + "nix/tools/*/bun.lock" |
141 | 137 | "nix/tools/*/bun.nix" |
142 | 138 | ]; |
143 | 139 |
|
|
149 | 145 | command = lib.getExe pkgs.oxfmt; |
150 | 146 | options = [ "--no-error-on-unmatched-pattern" ]; |
151 | 147 | includes = [ "*" ]; |
152 | | - excludes = [ "nix/tools/*/bun.lock" ]; |
153 | 148 | priority = 4; |
154 | 149 | }; |
155 | 150 | actionlint = { |
|
234 | 229 | ]; |
235 | 230 | priority = 10; |
236 | 231 | }; |
237 | | - bun-nix = { |
238 | | - command = lib.getExe generateBunNix; |
239 | | - includes = [ "nix/tools/*/bun.lock" ]; |
240 | | - priority = 11; |
241 | | - }; |
242 | 232 | }; |
243 | 233 | }; |
244 | 234 |
|
|
251 | 241 | program = lib.getExe schemaGen; |
252 | 242 | }; |
253 | 243 | # `nix run .#generate-bun-nix` derives every committed bun.nix from its |
254 | | - # sibling bun.lock. It is also the bun-nix treefmt formatter, so autofix.ci |
255 | | - # commits the result on dependency PRs; contributors can use |
256 | | - # `just gen-bun-nix` when a manifest also needs Bun to resolve a new lockfile. |
| 244 | + # sibling bun.lock. autofix.ci runs it on every pull request, while |
| 245 | + # contributors can use `just gen-bun-nix` when a manifest also needs Bun |
| 246 | + # to resolve a new lockfile. |
257 | 247 | apps.generate-bun-nix = { |
258 | 248 | type = "app"; |
259 | 249 | program = lib.getExe generateBunNix; |
|
0 commit comments