|
851 | 851 | };
|
852 | 852 | };
|
853 | 853 | nixfmt = mkOption {
|
854 |
| - description = "Deprecated nixfmt hook"; |
| 854 | + description = "Deprecated nixfmt hook. Use nixfmt-classic or nixfmt-rfc-style instead."; |
855 | 855 | visible = false;
|
856 | 856 | type = types.submodule {
|
857 | 857 | imports = [ hookModule ];
|
@@ -1372,6 +1372,37 @@ in
|
1372 | 1372 | };
|
1373 | 1373 | };
|
1374 | 1374 | };
|
| 1375 | + rome = mkOption { |
| 1376 | + description = "Deprecated rome hook. Use biome instead."; |
| 1377 | + visible = false; |
| 1378 | + type = types.submodule { |
| 1379 | + imports = [ hookModule ]; |
| 1380 | + options.settings = { |
| 1381 | + binPath = |
| 1382 | + mkOption { |
| 1383 | + type = types.nullOr types.path; |
| 1384 | + description = "`biome` binary path. E.g. if you want to use the `biome` in `node_modules`, use `./node_modules/.bin/biome`."; |
| 1385 | + default = null; |
| 1386 | + defaultText = "\${tools.biome}/bin/biome"; |
| 1387 | + }; |
| 1388 | + |
| 1389 | + write = |
| 1390 | + mkOption { |
| 1391 | + type = types.bool; |
| 1392 | + description = "Whether to edit files inplace."; |
| 1393 | + default = true; |
| 1394 | + }; |
| 1395 | + |
| 1396 | + configPath = mkOption { |
| 1397 | + type = types.str; |
| 1398 | + description = "Path to the configuration JSON file"; |
| 1399 | + # an empty string translates to use default configuration of the |
| 1400 | + # underlying biome binary (i.e biome.json if exists) |
| 1401 | + default = ""; |
| 1402 | + }; |
| 1403 | + }; |
| 1404 | + }; |
| 1405 | + }; |
1375 | 1406 | rustfmt = mkOption {
|
1376 | 1407 | description = ''
|
1377 | 1408 | Additional rustfmt settings
|
@@ -2986,9 +3017,14 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
|
2986 | 3017 | builtins.toString script;
|
2987 | 3018 | files = "\\.nix$";
|
2988 | 3019 | };
|
2989 |
| - # nixfmt was renamed to nixfmt-classic. |
2990 |
| - # The hook has been deprecated to free up the name for when the new RFC-style nixfmt becomes stable. |
2991 |
| - nixfmt = nixfmt-classic; |
| 3020 | + nixfmt = |
| 3021 | + { |
| 3022 | + name = "nixfmt-deprecated"; |
| 3023 | + description = "Deprecated Nix code prettifier. Use nixfmt-classic."; |
| 3024 | + package = tools.nixfmt; |
| 3025 | + entry = "${hooks.nixfmt.package}/bin/nixfmt ${lib.optionalString (hooks.nixfmt.settings.width != null) "--width=${toString hooks.nixfmt.settings.width}"}"; |
| 3026 | + files = "\\.nix$"; |
| 3027 | + }; |
2992 | 3028 | nixfmt-classic =
|
2993 | 3029 | {
|
2994 | 3030 | name = "nixfmt-classic";
|
@@ -3329,7 +3365,23 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
|
3329 | 3365 | "${hooks.ripsecrets.package}/bin/ripsecrets ${cmdArgs}";
|
3330 | 3366 | types = [ "text" ];
|
3331 | 3367 | };
|
3332 |
| - rome = biome; |
| 3368 | + rome = |
| 3369 | + { |
| 3370 | + name = "rome-deprecated"; |
| 3371 | + description = ""; |
| 3372 | + types_or = [ "javascript" "jsx" "ts" "tsx" "json" ]; |
| 3373 | + package = tools.biome; |
| 3374 | + entry = |
| 3375 | + let |
| 3376 | + binPath = migrateBinPathToPackage hooks.rome "/bin/biome"; |
| 3377 | + cmdArgs = |
| 3378 | + mkCmdArgs [ |
| 3379 | + [ (hooks.rome.settings.write) "--apply" ] |
| 3380 | + [ (hooks.rome.settings.configPath != "") "--config-path ${hooks.rome.settings.configPath}" ] |
| 3381 | + ]; |
| 3382 | + in |
| 3383 | + "${binPath} check ${cmdArgs}"; |
| 3384 | + }; |
3333 | 3385 | ruff =
|
3334 | 3386 | {
|
3335 | 3387 | name = "ruff";
|
|
0 commit comments