Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making this work in nixpkgs #109

Open
CMCDragonkai opened this issue Sep 22, 2020 · 3 comments
Open

Making this work in nixpkgs #109

CMCDragonkai opened this issue Sep 22, 2020 · 3 comments

Comments

@CMCDragonkai
Copy link

I've noticed grpc-haskell and loads of downstream deps are broken in nixpkgs master.

However since it is working here, it should be possible to make it work in nixpkgs as well.

First was proto3-wire which had an older version, fixed by overriding with a custom derivation pointing to the 1.2.0.

Second thing was parameterized. It was fixed by disabling tests: louispan/parameterized#2

Third thing was proto3-suite with 1 test failure due to a missing test file. Fixed by disabling tests.

But finally there's some C compilation issues. We can see alot of changes in release.nix but, not sure what is causing the C issues here.

Why not push up the specific overlays here to nixpkgs upstream so that grpc-haskell can work cleanly?

@nzhang-zh
Copy link

I tried importing the release.nix from this repo directly in my nix files.

But because we have a different nixpkgs pin, haskell package conflict occurs.

My shell.nix

{ pkgs ? import ./pkgs.nix }:

with pkgs;
let
  haskellPackages = haskell.packages.ghc865;
  grpc-haskell-src = builtins.fetchGit {
    url = https://github.com/awakesecurity/gRPC-haskell;
    rev = "d8f6e0b476797938f5c759146a2bbdc829ba1a84";
  };
  grpc-haskell = (import "${grpc-haskell-src}/release.nix").grpc-haskell;
  drv = (haskellPackages.callPackage ./default.nix { inherit grpc-haskell; }).env;
in
  drv.overrideAttrs (attrs: {
    src = null;
    nativeBuildInputs =...
    shellHook = ...
  })

Error message is:

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: matrix-ark-0.1.0.0 (user goal)
[__1] trying: grpc-haskell-0.0.1.0/installed-IZB... (dependency of matrix-ark)
[__2] next goal: conduit-extra (dependency of matrix-ark)
[__2] rejecting: conduit-extra-1.3.5/installed-GDE... (conflict: grpc-haskell
=> async==2.2.2/installed-6rO..., conduit-extra =>
async==2.2.2/installed-Axg...)
[__2] fail (backjumping, conflict set: conduit-extra, grpc-haskell,
matrix-ark)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: grpc-haskell, matrix-ark,
conduit-extra

@CMCDragonkai
Copy link
Author

This is still broken on Nixpkgs 21.05:

nix-repl> :b pkgs.haskellPackages.grpc-haskell      
builder for '/nix/store/6h7m7i87gk1mrj6iv7hg65nlx0c0jz2c-grpc-haskell-core-0.0.0.0.drv' failed with exit code 1; last 10 log lines:
  Using tar found on system at:
  /nix/store/hlmzk7zf3xp54dgf6kmk0qg13wc9ma8j-gnutar-1.34/bin/tar
  No uhc found
  building
  Preprocessing library for grpc-haskell-core-0.0.0.0..
  c2hs: Errors during expansion of binding hooks:
  
  src/Network/GRPC/Unsafe.chs:222: (column 7) [ERROR]  >>> Unknown identifier!
    Cannot find a definition for `grpc_channel_ping' in the header file.
cannot build derivation '/nix/store/6v5mc2mcmyqqwhpqy9j9mkzs4adjp32r-grpc-haskell-0.1.0.drv': 1 dependencies couldn't be built
[0 built (1 failed)]
error: build of '/nix/store/6v5mc2mcmyqqwhpqy9j9mkzs4adjp32r-grpc-haskell-0.1.0.drv' failed

@CMCDragonkai
Copy link
Author

Tasty is resolved but preprocessing is still a problem. Seems like the default.nix needs to be fixed as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants