Skip to content

Commit

Permalink
ci: ensure flake is formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Nov 15, 2024
1 parent 7b98274 commit e117efa
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 21 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test Nix flake

on:
pull_request:
push:
branches:
- main

jobs:
format:
name: check flake formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix fmt

# Check that formatting does not change anything.
- run: git diff --exit-code
44 changes: 23 additions & 21 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -533,28 +533,30 @@
};
};

devShells.default = let
pkgs = import nixpkgs {
system = system;
overlays = [ fenix.overlays.default ];
};
in pkgs.mkShell {
devShells.default =
let
pkgs = import nixpkgs {
system = system;
overlays = [ fenix.overlays.default ];
};
in
pkgs.mkShell {

buildInputs = with pkgs; [
(fenix.packages.${system}.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
cargo-deny
rust-analyzer-nightly
cargo-nextest
perl # needed to build vendored OpenSSL
git-cliff
];
};
buildInputs = with pkgs; [
(fenix.packages.${system}.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
cargo-deny
rust-analyzer-nightly
cargo-nextest
perl # needed to build vendored OpenSSL
git-cliff
];
};
}
);
}

0 comments on commit e117efa

Please sign in to comment.