Skip to content
Snippets Groups Projects
Commit 3cd8d5cf authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Add a helper for running `hlint` via the flake.

parent 4feccf13
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,25 @@ rec { ...@@ -65,6 +65,25 @@ rec {
${packageName} = default; ${packageName} = default;
}; };
apps = {
# Create a program that runs hlint.
hlint = {
# An argv to pass to hlint in addition to any arguments passed on the
# `nix run` command line.
argv ? [ "src/" "test/" ]
}: {
type = "app";
program =
let
args = builtins.concatStringsSep " " argv;
in
"${pkgs.writeScript "hlint"
''
${hsPkgs.hlint}/bin/hlint ${args} "$@"
''}";
};
};
# haskellDevShell = { pkgs, system, haskellPackageName, src }: # haskellDevShell = { pkgs, system, haskellPackageName, src }:
# let # let
# hsPkgs' = hsPkgs { # hsPkgs' = hsPkgs {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment