mirror of
https://github.com/h7x4/nix-attr-search.git
synced 2024-12-21 19:47:29 +01:00
utils/ormolu: init
Add tool for formatting haskell files
This commit is contained in:
parent
ca3e27ec77
commit
eab555988e
@ -22,13 +22,6 @@
|
||||
home-manager-search nix-option-search nix-package-search nix2json;
|
||||
};
|
||||
|
||||
checks.${system} = let
|
||||
|
||||
in {
|
||||
# hlint = pkgs.callPackage ./utils/hlint.nix {};
|
||||
# format = pkgs.callPackage ./utils/format.nix {};
|
||||
};
|
||||
|
||||
hydraJobs = with pkgs.lib;
|
||||
mapAttrs' (name: value: nameValuePair name { ${system} = value; })
|
||||
self.packages.${system};
|
||||
|
@ -5,8 +5,10 @@ pkgs.mkShell {
|
||||
shellHook = let
|
||||
format = pkgs.callPackage ./utils/format.nix { };
|
||||
hlint = pkgs.callPackage ./utils/hlint.nix { };
|
||||
ormolu = pkgs.callPackage ./utils/ormolu.nix { };
|
||||
in ''
|
||||
alias nasf=${format}/bin/nix-attrs-search-format
|
||||
alias nashl=${hlint}/bin/nix-attrs-search-hlint
|
||||
alias nashf=${ormolu}/bin/nix-attrs-search-ormolu
|
||||
'';
|
||||
}
|
||||
|
4
utils/ormolu.nix
Normal file
4
utils/ormolu.nix
Normal file
@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.writeScriptBin "nix-attrs-search-ormolu" ''
|
||||
find -name '*.hs' -exec '${pkgs.ormolu}/bin/ormolu' --mode inplace {} \;
|
||||
''
|
Loading…
Reference in New Issue
Block a user