From d665156749063001428bd2fd429ce442bac35e90 Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Mon, 13 Nov 2023 17:47:12 +0100 Subject: [PATCH 1/2] Reduce the size for CI image by getting rid of 2 GHCs apply-refact refers to the GHC that it builds with by using the GHC.Paths module. This tool is actually not required in CI. ormolu was referring to GHC and all its haskell dependencies as "propagatedBuildInputs". Using `hlib.justStaticExecutables` we can get rid of these. --- nix/wire-server.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/wire-server.nix b/nix/wire-server.nix index f22c2603659..645ad741b23 100644 --- a/nix/wire-server.nix +++ b/nix/wire-server.nix @@ -410,13 +410,12 @@ let pkgs.kubernetes-helm pkgs.helmfile pkgs.hlint - (hlib.justStaticExecutables pkgs.haskellPackages.apply-refact) pkgs.jq pkgs.kubectl pkgs.kubelogin-oidc pkgs.nixpkgs-fmt pkgs.openssl - ormolu + (hlib.justStaticExecutables ormolu) pkgs.shellcheck pkgs.treefmt pkgs.gawk @@ -495,6 +494,7 @@ in pkgs.kind pkgs.netcat pkgs.niv + (hlib.justStaticExecutables pkgs.haskellPackages.apply-refact) (pkgs.python3.withPackages (ps: with ps; [ black From 7ede86bafc30c2e546156a9fab0ac8094957de4b Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Mon, 13 Nov 2023 17:50:17 +0100 Subject: [PATCH 2/2] changelog --- changelog.d/5-internal/reduce-ci-image-size | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/5-internal/reduce-ci-image-size diff --git a/changelog.d/5-internal/reduce-ci-image-size b/changelog.d/5-internal/reduce-ci-image-size new file mode 100644 index 00000000000..facc2713efe --- /dev/null +++ b/changelog.d/5-internal/reduce-ci-image-size @@ -0,0 +1,3 @@ +Remove apply-refact from CI image + +This gets rid of GHC in the image, making the image smaller. \ No newline at end of file