diff --git a/README.md b/README.md index 7e9c07e..359c47c 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ tested. Additionally, the `--review` flag can be used to initiate a run of [nixpkgs-review](https://github.com/Mic92/nixpkgs-review), which will ensure all dependent packages can be built. In order to ensure consistent formatting, the `--format` flag will invoke -[nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt). +[nixfmt](https://github.com/NixOS/nixfmt). ```console # Also runs nix-build diff --git a/default.nix b/default.nix index ea3f7d7..893382c 100644 --- a/default.nix +++ b/default.nix @@ -21,7 +21,7 @@ pkgs.python311.pkgs.buildPythonApplication { makeWrapperArgs = [ "--prefix PATH" ":" - (pkgs.lib.makeBinPath [ pkgs.nixVersions.stable or pkgs.nix_2_4 pkgs.nixpkgs-review pkgs.nix-prefetch-git ]) + (pkgs.lib.makeBinPath [ pkgs.nixVersions.stable or pkgs.nix_2_4 pkgs.nixpkgs-review pkgs.nix-prefetch-git pkgs.nixfmt-rfc-style ]) ]; shellHook = '' # workaround because `python setup.py develop` breaks for me diff --git a/nix_update/__init__.py b/nix_update/__init__.py index 32cfaaf..b626d46 100644 --- a/nix_update/__init__.py +++ b/nix_update/__init__.py @@ -31,7 +31,7 @@ def parse_args(args: list[str]) -> Options: parser.add_argument( "--review", action="store_true", help="Run `nixpkgs-review wip`" ) - parser.add_argument("--format", action="store_true", help="Run `nixpkgs-fmt`") + parser.add_argument("--format", action="store_true", help="Run `nixfmt`") parser.add_argument( "--commit", action="store_true", help="Commit the updated package" ) @@ -326,7 +326,7 @@ def main(args: list[str] = sys.argv[1:]) -> None: nixpkgs_review() if options.format: - run(["nixpkgs-fmt", package.filename], stdout=None) + run(["nixfmt", package.filename], stdout=None) if options.commit: assert git_dir is not None diff --git a/nix_update/version/__init__.py b/nix_update/version/__init__.py index 995fa5a..699b65a 100644 --- a/nix_update/version/__init__.py +++ b/nix_update/version/__init__.py @@ -27,8 +27,7 @@ from .version import Version, VersionPreference class SnapshotFetcher(Protocol): - def __call__(self, url: ParseResult, branch: str) -> list[Version]: - ... + def __call__(self, url: ParseResult, branch: str) -> list[Version]: ... fetchers: list[Callable[[ParseResult], list[Version]]] = [