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`.
This commit is contained in:
Joel Stanley 2021-06-29 08:52:54 -05:00
parent e80dd2ff31
commit f7ee958dbd
No known key found for this signature in database
GPG key ID: F368244CDC80C97F

View file

@ -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: