diff options
author | Vincent Ambo <tazjin@google.com> | 2019-08-19T23·26+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-08-19T23·26+0100 |
commit | b856648127e89321db338344019544a4fcdcbf93 (patch) | |
tree | d0ec017298c9faec2592d5a73aaa66a897feb1c4 | |
parent | 11fcf6229751eb266485cbba78d30aced1787d14 (diff) |
feat(tools): Introduce ormolu for formatting Haskell code r/45
-rw-r--r-- | default.nix | 6 | ||||
-rwxr-xr-x | tools/bin/__dispatch.sh | 6 | ||||
l--------- | tools/bin/ormolu (renamed from tools/bin/stylish-haskell) | 0 |
3 files changed, 9 insertions, 3 deletions
diff --git a/default.nix b/default.nix index e9288179c986..5d9f128208eb 100644 --- a/default.nix +++ b/default.nix @@ -19,6 +19,12 @@ let gitAppraise = pkgs.callPackage ./third_party/go/git-appraise/git-appraise {}; nixery = import ./third_party/nixery.nix { pkgs = super; }; terraform-gcp = pkgs.terraform_0_12.withPlugins(p: [ p.google ]); + ormolu = import (super.fetchFromGitHub { + owner = "tweag"; + repo = "ormolu"; + rev = "a7076c0f83e5c06ea9067b71171859fa2ba8afd9"; + sha256 = "1p4n2ja4ciw3qfskn65ggpy37mvgf2sslxqmqn8s8jjarnqcyfny"; + }) { pkgs = super; }; }; # The pinned commit here is identical to the public nixery.dev diff --git a/tools/bin/__dispatch.sh b/tools/bin/__dispatch.sh index 7af832c65f00..1df5957fda69 100755 --- a/tools/bin/__dispatch.sh +++ b/tools/bin/__dispatch.sh @@ -13,9 +13,6 @@ case "${TARGET_TOOL}" in git-appraise) attr="thirdParty.gitAppraise" ;; - stylish-haskell) - attr="haskellPackages.stylish-haskell" - ;; terraform) attr="terraform-gcp" ;; @@ -25,6 +22,9 @@ case "${TARGET_TOOL}" in blog_cli) attr="tazjin.blog_cli" ;; + ormolu) + attr="ormolu" + ;; *) echo "The tool '${TARGET_TOOL}' is currently not installed in this repository." exit 1 diff --git a/tools/bin/stylish-haskell b/tools/bin/ormolu index 8390ec9c9652..8390ec9c9652 120000 --- a/tools/bin/stylish-haskell +++ b/tools/bin/ormolu |