diff --git a/default.nix b/default.nix index 97d4e50..245ffd9 100644 --- a/default.nix +++ b/default.nix @@ -148,7 +148,7 @@ let niv-devshell = haskellPackages.shellFor { buildInputs = [ pkgs.nixpkgs-fmt - pkgs.ormolu + pkgs.haskellPackages.ormolu ]; packages = ps: [ ps.niv ]; shellHook = '' diff --git a/nix/default.nix b/nix/default.nix index 9e5889c..a4d3eee 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,14 +1,9 @@ { sources ? import ./sources.nix }: -let - ormoluCompiler = "ghc865"; -in import sources.nixpkgs { overlays = [ (_: pkgs: { inherit sources; }) (_: pkgs: { nixpkgs-fmt = import pkgs.sources.nixpkgs-fmt {}; }) (_: pkgs: { termtosvg = pkgs.callPackage ./termtosvg.nix {}; }) - (import ./haskell-overlay.nix { inherit ormoluCompiler; }) - (_: pkgs: { ormolu = pkgs.haskell.packages."${ormoluCompiler}".ormolu; }) ]; config = {}; } diff --git a/nix/haskell-overlay.nix b/nix/haskell-overlay.nix deleted file mode 100644 index b4a3248..0000000 --- a/nix/haskell-overlay.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ormoluCompiler }: self: super: - -let - ormolu = import super.sources.ormolu { pkgs = self; inherit ormoluCompiler; }; -in -{ - haskell = super.haskell // { - packages = super.haskell.packages // { - "${ormolu.ormoluCompiler}" = super.haskell.packages.${ormolu.ormoluCompiler}.override { - overrides = ormolu.ormoluOverlay; - }; - }; - }; -} diff --git a/nix/sources.json b/nix/sources.json index 9883fd6..acd8a53 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -23,18 +23,6 @@ "url": "https://github.com/nix-community/nixpkgs-fmt/archive/2a64f4b6a597d0d62004ffcec3ae4fd83cd1efc8.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, - "ormolu": { - "branch": "master", - "description": "A formatter for Haskell source code", - "homepage": null, - "owner": "tweag", - "repo": "ormolu", - "rev": "22839ed74c9964578ae3b2af5c693f605ac8a687", - "sha256": "055z8p8kl80fr50crcvy2djk3qg2x34p8pa7kihxlcj9wrhsijyy", - "type": "tarball", - "url": "https://github.com/tweag/ormolu/archive/22839ed74c9964578ae3b2af5c693f605ac8a687.tar.gz", - "url_template": "https://github.com///archive/.tar.gz" - }, "termtosvg": { "branch": "develop", "description": "Record terminal sessions as SVG animations", diff --git a/script/fmt b/script/fmt index 122bb0b..493534b 100755 --- a/script/fmt +++ b/script/fmt @@ -1,12 +1,11 @@ #!/usr/bin/env bash ### -### fmt — find changed Haskell files and format them with ormolu +### fmt - find changed Haskell files and format them with ormolu ### ### Usage: -### fmt [-c] [-i] +### fmt [-c] ### ### Options: -### -i Format files inplace, will change files! ### -c Only check formatting, don't change files ### -h Print this message