From d50a114a94edb539bef6b699ad4d6977d035b4d6 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Tue, 1 Sep 2026 19:08:48 +0200 Subject: [PATCH 1/4] Changelog. --- ...28448-add-headroom-to-treefmt_-pin-to-0_5_0_0-_github-master_ | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5-internal/WPB-28448-add-headroom-to-treefmt_-pin-to-0_5_0_0-_github-master_ 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). From f78ad04076d0aed11a61e7fb6755fa9224531ce6 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Tue, 1 Sep 2026 19:10:33 +0200 Subject: [PATCH 2/4] Add headroom to treefmt, pin to 0.5.0.0 (github master). --- flake.lock | 18 ++++++++++++++++++ flake.nix | 7 +++++++ nix/haskell-pins.nix | 6 +++++- treefmt.toml | 7 +++++++ 4 files changed, 37 insertions(+), 1 deletion(-) 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/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" From 397145c6a07ce039023f24f45c5117e308413406 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Tue, 1 Sep 2026 19:15:06 +0200 Subject: [PATCH 3/4] Use pinned headroom, not the standard one. (Thanks Akshay!) --- nix/wire-server.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/wire-server.nix b/nix/wire-server.nix index c3a3010efe6..45125c0685f 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 haskellPackages.headroom) (hlib.justStaticExecutables pkgs.haskellPackages.weeder) ] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [ pkgs.skopeo From c7de429067b9bbe080da644640aa20400bb58107 Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Wed, 2 Sep 2026 14:45:45 +0200 Subject: [PATCH 4/4] fix: do not run tests --- nix/wire-server.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/wire-server.nix b/nix/wire-server.nix index 45125c0685f..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 haskellPackages.headroom) + (hlib.justStaticExecutables (hlib.dontCheck haskellPackages.headroom)) (hlib.justStaticExecutables pkgs.haskellPackages.weeder) ] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [ pkgs.skopeo