Skip to content

Commit

Permalink
add modern C example
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Aug 14, 2023
1 parent be12f10 commit d70cec8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/modern-c/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A demonstration of https://interrupt.memfault.com/blog/a-modern-c-dev-env
14 changes: 14 additions & 0 deletions examples/modern-c/devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ pkgs, ... }: {
languages.c.enable = true;

packages = [ pkgs.cmake pkgs.ceedling ];

enterShell = ''
cmake --version
'';

pre-commit.hooks = {
clang-format.enable = true;
clang-tidy.enable = true;
};
}
3 changes: 3 additions & 0 deletions examples/modern-c/devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable

0 comments on commit d70cec8

Please sign in to comment.