Skip to content

Commit

Permalink
Add GH action to verify fmtting
Browse files Browse the repository at this point in the history
  • Loading branch information
rounakdatta committed Mar 27, 2024
1 parent ef8bb48 commit 9bebca2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Validate if the Nix setup is correctly formatted and builds
on: [push]
jobs:
check-if-formatted:
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/checkout@v3
- name: Check format
run: nix-shell -p nixpkgs-fmt --run 'nixpkgs-fmt --check .'
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
let
pkgs = nixpkgs.legacyPackages.${system};
isDarwin = pkgs.stdenv.isDarwin;
# thanks to https://github.com/commercialhaskell/stack/issues/1698#issuecomment-178098712 for the idea
darwinFrameworks = pkgs.lib.optionals isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
Cocoa
CoreServices
Expand Down

0 comments on commit 9bebca2

Please sign in to comment.