From f7ee958dbdb1f50efb8a554396f426b7daf85ab9 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 29 Jun 2021 08:52:54 -0500 Subject: [PATCH] Fix test-grpc-haskell shell These changes seemed necessary in order to actually build and run the tests sucessfully inside `nix-shell release.nix --attr test-grpc-haskell`. --- release.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/release.nix b/release.nix index 06aafc7..76dde9e 100644 --- a/release.nix +++ b/release.nix @@ -190,12 +190,26 @@ let test-grpc-haskell = pkgsNew.mkShell { nativeBuildInputs = [ - (pkgsNew.haskellPackages.ghcWithPackages (pkgs: [ - pkgs.grpc-haskell - ] - ) - ) + (with pkgsNew.haskellPackages; [ + cabal-install + c2hs + (ghcWithPackages (pkgs: with pkgs; [ + grpc-haskell-core + # No need to guard nix-shell entry on passing package tests + (pkgsNew.haskell.lib.dontCheck grpc-haskell) + language-c + # Additional packages we need to have available for building + # and running tests in the nix-shell environment + mmorph pipes tasty tasty-hunit tasty-quickcheck + ])) + ]) + (pkgsNew.python.withPackages (pkgs: [ pkgs.grpcio-tools ])) ]; + shellHook = '' + ${shell-hook-common} + echo Running: cabal configure --extra-include-dirs ${pkgsNew.grpc}/include --extra-lib-dirs ${pkgsNew.grpc}/lib --enable-tests + cabal configure --extra-include-dirs ${pkgsNew.grpc}/include --extra-lib-dirs ${pkgsNew.grpc}/lib --enable-tests + ''; }; usesGRPC = haskellPackage: