1
0
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:
Oystein Kristoffer Tveit 2022-11-26 20:48:26 +01:00
parent ca3e27ec77
commit eab555988e
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
3 changed files with 6 additions and 7 deletions

View File

@ -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};

View File

@ -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
View File

@ -0,0 +1,4 @@
{ pkgs, ... }:
pkgs.writeScriptBin "nix-attrs-search-ormolu" ''
find -name '*.hs' -exec '${pkgs.ormolu}/bin/ormolu' --mode inplace {} \;
''