Ormolu in default.nix and emacs before-save hook. (#1059)

* chore: Add ormolu

* chore: Emacs hook to format via ormolu
This commit is contained in:
jacereda 2020-12-08 22:09:57 +01:00 committed by GitHub
parent 8c5a117c82
commit dd19c049c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
.dir-locals.el Normal file
View File

@ -0,0 +1 @@
((haskell-mode (eval . (ormolu-format-on-save-mode 1))))

View File

@ -17,7 +17,7 @@ let
, cmark, containers, directory, edit-distance, filepath
, haskeline, HUnit, mtl, optparse-applicative, parsec, process, split, text
, darwin, glfw3, SDL2, SDL2_image, SDL2_gfx, SDL2_mixer, SDL2_ttf
, ghc-prof-flamegraph
, ghc-prof-flamegraph, ormolu
, clang , makeWrapper
, libXext, libXcursor, libXinerama, libXi, libXrandr, libXScrnSaver, libXxf86vm, libpthreadstubs, libXdmcp, libGL
@ -47,7 +47,7 @@ let
clang
];
executableToolDepends = optionals pkgs.lib.inNixShell (
[ cabal-install clang gdb ]
[ cabal-install clang gdb ormolu ]
++ optionals stdenv.isLinux [ flamegraph linuxPackages.perf tinycc zig ]
);
executableFrameworkDepends = with darwin.apple_sdk.frameworks; optionals stdenv.isDarwin [