diff --git a/changelog.d/5-internal/WPB-28448-add-headroom-to-treefmt_-pin-to-0_5_0_0-_github-master_ b/changelog.d/5-internal/WPB-28448-add-headroom-to-treefmt_-pin-to-0_5_0_0-_github-master_ new file mode 100644 index 00000000000..022fa05f4f6 --- /dev/null +++ b/changelog.d/5-internal/WPB-28448-add-headroom-to-treefmt_-pin-to-0_5_0_0-_github-master_ @@ -0,0 +1 @@ +Add headroom to treefmt, pin to 0.5.0.0 (github master). diff --git a/flake.lock b/flake.lock index 67d13b227d8..38e18bceec0 100644 --- a/flake.lock +++ b/flake.lock @@ -249,6 +249,23 @@ "type": "github" } }, + "headroom": { + "flake": false, + "locked": { + "lastModified": 1788175700, + "narHash": "sha256-7Pj8dP56vbFzx6SnjFpA2vRY/hDCNvx6yIyc2A2B7NU=", + "owner": "xwinus", + "repo": "headroom", + "rev": "010ed0ca68f0af9026bb613800cbeae80be6ebbd", + "type": "github" + }, + "original": { + "owner": "xwinus", + "repo": "headroom", + "rev": "010ed0ca68f0af9026bb613800cbeae80be6ebbd", + "type": "github" + } + }, "hsaml2": { "flake": false, "locked": { @@ -392,6 +409,7 @@ "flake-utils": "flake-utils", "hasql-migration": "hasql-migration", "hasql-resource-pool": "hasql-resource-pool", + "headroom": "headroom", "hsaml2": "hsaml2", "hspec-wai": "hspec-wai", "http-client": "http-client", diff --git a/flake.nix b/flake.nix index 46255be3e45..7e5b5c6ab99 100644 --- a/flake.nix +++ b/flake.nix @@ -114,6 +114,13 @@ url = "github:velveteer/arbiter?rev=b9c57eb1f8277d97616aa449bea471fe9ce14eda"; flake = false; }; + + headroom = { + # https://github.com/xwinus/headroom/issues/117 + # this pin should be removed once 0.5.0.0 has been released. + url = "github:xwinus/headroom?rev=010ed0ca68f0af9026bb613800cbeae80be6ebbd"; + flake = false; + }; }; outputs = inputs@{ nixpkgs, nixpkgs_24_11, flake-utils, tom-bombadil, sbomnix, ... }: diff --git a/nix/haskell-pins.nix b/nix/haskell-pins.nix index 13ebf988279..05531592ddf 100644 --- a/nix/haskell-pins.nix +++ b/nix/haskell-pins.nix @@ -71,6 +71,10 @@ let }; }; + headroom = { + src = inputs.headroom; + }; + bloodhound = { src = inputs.bloodhound; }; @@ -149,7 +153,7 @@ let # N.B. only the listed packages work. If you want to use another: # - list it here # - patch it on the fork (if required) - # + # # Can't currently be removed because amazonka-dynamodb-attributevalue # does not exist on hackage amazonka = { diff --git a/nix/wire-server.nix b/nix/wire-server.nix index c3a3010efe6..13495ea2be2 100644 --- a/nix/wire-server.nix +++ b/nix/wire-server.nix @@ -470,7 +470,7 @@ let pkgs.cfssl pkgs.awscli2 (hlib.justStaticExecutables pkgs.haskellPackages.cabal-fmt) - (hlib.justStaticExecutables pkgs.haskellPackages.headroom) + (hlib.justStaticExecutables (hlib.dontCheck haskellPackages.headroom)) (hlib.justStaticExecutables pkgs.haskellPackages.weeder) ] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [ pkgs.skopeo diff --git a/treefmt.toml b/treefmt.toml index cc49a82bf60..516cbd86fbb 100644 --- a/treefmt.toml +++ b/treefmt.toml @@ -10,6 +10,13 @@ excludes = [ "dist-newstyle/" ] +[formatter.headroom] +command = "hack/bin/headroom-treefmt.sh" +includes = ["*.hs", "*.hsc", "*.rs"] +excludes = [ + "dist-newstyle/", + "services/wire-server-enterprise/*", +] [formatter.shellcheck] command = "shellcheck"