awakesecurity / gRPC-haskell

Haskell gRPC support
https://hackage.haskell.org/package/grpc-haskell
Apache License 2.0
238 stars 75 forks source link

Usage #161

Closed MohsenNz closed 6 months ago

MohsenNz commented 6 months ago

How can I use gRPC-Haskell in my-project? It seems adding to cabal as build-depends doesn't work, because the version in Hackage is out of data (0.1.0). Also, I tried to add master repo as dependency but still cabal build failed.

riz0id commented 6 months ago

You can use Nix or can pull the tip of the main repo and configure the correct dependencies in the cabal project file.

MohsenNz commented 6 months ago

I need an example of how to figure out the project with nix to use this library spacial in flake if possible.

riz0id commented 6 months ago

I need an example of how to figure out the project with nix to use this library spacial in flake if possible.

If you're already familiar with Nix I encourage you to take a look at how Haskell packages are provisioned in release.nix. The Haskell packages overlay in release.nix is used to compile the examples we provide in the examples/ directory. Instantiating the derivation as a Nix flake will not require you to change anything.

Until I'm giving more information, I must assume that the issue you're having is unrelated to grpc-rest. If there is a particular problem with building the derivation, then you should provide more context about what the problem is, why you believe it is an issue, and ideally how that issue could be addressed by yourself, me, or other maintainers. Otherwise, I feel like there may be better places for you to seek assistance other than here.

Thanks