-
Notifications
You must be signed in to change notification settings - Fork 78
Description
I'm getting the following:
[nix-shell:/mnt]# cabal build
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- grpc-haskell-core-0.0.0.0 (lib) (first run)
- grpc-haskell-0.0.1.0 (lib) (first run)
Configuring library for grpc-haskell-core-0.0.0.0..
cabal: Missing dependencies on foreign libraries:
* Missing (or bad) header file: include/grpc_haskell.h
* Missing (or bad) C libraries: grpc, gpr
Context: I'm trying to build this on MacOS and hence (post the MacOS Catalina debacle) running in Docker for Mac. I've had to make the following change (as per #59) to disable tests as some of them try to create ipv6 localhost sockets and that doesn't seem to be supported on docker for Mac
diff --git a/release.nix b/release.nix
index 34fa7f0..199f255 100644
--- a/release.nix
+++ b/release.nix
@@ -204,10 +204,13 @@ let
(haskellPackagesNew.callPackage ./nix/proto3-suite.nix {});
grpc-haskell-core =
- pkgs.haskell.lib.buildFromSdist (usesGRPC
- (pkgs.haskell.lib.overrideCabal
- (haskellPackagesNew.callPackage ./core { })
- (_: { buildDepends = [ haskellPackagesNew.c2hs ]; })));
+ usesGRPC (pkgs.haskell.lib.dontCheck (haskellPackagesNew.callPackage ./core { }));
+
+ #grpc-haskell-core =
+ # pkgs.haskell.lib.buildFromSdist (usesGRPC
+ # (pkgs.haskell.lib.overrideCabal
+ # (haskellPackagesNew.callPackage ./core { })
+ # (_: { buildDepends = [ haskellPackagesNew.c2hs ]; })));
grpc-haskell-no-tests =
pkgs.haskell.lib.buildFromSdist (usesGRPC
Following that, the steps to reproduce are the following (from the root dir of a clone of this repo):
docker run --rm -ti -v $PWD:/mnt nixos/nix:2.3 sh
cd /mnt
nix-env -i curl cabal-install #cabal seems to be broken otherwise as it will try to use busybox wget
cabal update
nix-shell release.nix -A grpc-haskell-no-tests.env
cabal configure
cabal build
Sorry, that's a lot of text! But should give full steps to reproduce. I'm afraid my nix knowledge is still a little lacking so for my own edification: will the above result in cabal using haskell packages provided by nix rather than from hackage? Obviously that is normally what we want when using nix but I wasn't clear on how the cabal nix-support works