Skip to content

Commit

Permalink
formatter
Browse files Browse the repository at this point in the history
formatter

update formatter

format
  • Loading branch information
juliamertz committed Oct 13, 2024
1 parent 97abb46 commit 0bc8b52
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 206 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 27 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
url = "github:juliamertz/glove80-firmware-updater";
inputs.nixpkgs.follows = "nixpkgs";
};

# dtsfmt = {
# url = "github:juliamertz/dtsfmt/dev?submodules=1";
# flake = false;
# };
# treesitter-devicetree = {
# url = "github:mskelton/tree-sitter-devicetree";
# flake = false;
# };
keymap-drawer = {
url = "github:caksoylar/keymap-drawer";
flake = false;
Expand Down Expand Up @@ -46,14 +53,33 @@
let
inherit (pkgs) callPackage writeShellScriptBin;
inherit (config) packages;

firmwareLoader = firmware-loader.packages.${system}.default;
dtsfmt = callPackage ./packages/dtsfmt.nix { inherit inputs; };
in
{
packages.firmware = callPackage ./packages/firmware.nix { inherit inputs; };
packages.visual = callPackage ./packages/visual.nix { inherit inputs; };
packages.flash = writeShellScriptBin "flash" ''
${lib.getExe firmwareLoader} --file ${packages.firmware}/glove80.uf2 --mount
'';
packages.format =
let
dtsfmtrc =
pkgs.writeText ".dtsfmtrc.toml" # toml
''
layout = "moergo:glove80"
[options]
separate_sections = true
indent_size = 4
'';
in
writeShellScriptBin "dtsfmt" ''
${lib.getExe dtsfmt} --config-file ${dtsfmtrc} $@
'';

devShells.default = pkgs.mkShell { packages = [ packages.format ]; };

packages.default = packages.firmware;
apps.default = {
Expand Down
Loading

0 comments on commit 0bc8b52

Please sign in to comment.