Skip to content

Commit

Permalink
chore(nix): better formatting job (#1282)
Browse files Browse the repository at this point in the history
one that doesn't install a bunch of unrelated stuff just to format

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed May 17, 2024
1 parent e57135c commit e3b97b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix develop -c make nix-fmt
- run: nix develop .#fmt -c make nix-fmt
7 changes: 7 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@

release =
pkgs_4_14.mkShell { buildInputs = [ pkgs_4_14.dune-release ]; };

fmt = let pkgs = (import nixpkgs { inherit system; });
in pkgs.mkShell {
# TODO: get rid of ocaml once dune get format without ocaml being
# present
buildInputs = (with pkgs; [ ocaml ocamlformat_0_26_1 yarn dune_3 ]);
};
};
}));
}

0 comments on commit e3b97b6

Please sign in to comment.