From a9035bba2fe612f7b32ce3b48ac1459b18bb67f0 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 3 Jun 2022 15:38:56 +0200 Subject: [PATCH] nix: use the matching weeder weeder needs to be compiled with the same GHC that we build postgrest with. Before this change, we were relying on the fact that we happened to set ${compiler} to the same ghc8107 as used by nixpkgs for haskellPackages, now we explicitly take it from the correct haskell package set. --- default.nix | 1 + nix/tools/tests.nix | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index a484819a6..52c9ea705 100644 --- a/default.nix +++ b/default.nix @@ -149,6 +149,7 @@ rec { inherit postgrest devCabalOptions withTools; ghc = pkgs.haskell.compiler."${compiler}"; inherit (pkgs.haskell.packages."${compiler}") hpc-codecov; + inherit (pkgs.haskell.packages."${compiler}") weeder; }; withTools = diff --git a/nix/tools/tests.nix b/nix/tools/tests.nix index e8c66bfe7..e04df8a54 100644 --- a/nix/tools/tests.nix +++ b/nix/tools/tests.nix @@ -5,12 +5,12 @@ , ghc , glibcLocales , gnugrep -, haskellPackages , hpc-codecov , jq , postgrest , python3 , runtimeShell +, weeder , withTools , yq }: @@ -137,7 +137,7 @@ let ( trap 'echo Found dead code: Check file list above.' ERR ; - ${haskellPackages.weeder}/bin/weeder --config=./test/weeder.dhall + ${weeder}/bin/weeder --config=./test/weeder.dhall ) # collect all tests