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

Problem with external libraries #2

Open
AlexeyRaga opened this issue Dec 29, 2016 · 3 comments
Open

Problem with external libraries #2

AlexeyRaga opened this issue Dec 29, 2016 · 3 comments

Comments

@AlexeyRaga
Copy link

I am trying to build a project that contains extra dependencies:

from my .cabal file:

  extra-lib-dirs:      /usr/local/lib
  extra-libraries:     rdkafka

Here is the error I have:

$ nix-shell .styx/shell.nix --run "cabal install"                                                                                                      
error: anonymous function at /Users/alexey/src/github/kafka-client/.styx/kafka-client.nix:1:1 called without required argument ‘rdkafka’, at /Users/alexey/src/github/kafka-client/.styx/shell.nix:12:17

Is it that styx doesn't support extra libs or I am doing something wrong?

My styx.yaml:

local-packages:
  kafka-client:
    location: .

stack can build this project without any errors, here is my stack.yaml:

flags: {}
packages:
- '.'
extra-deps:   

resolver: lts-7.13
@jyp
Copy link
Owner

jyp commented Jan 23, 2017

Please try with the latest patch provided by mpickering. If it does not work try putting rdkafka in the non-haskell-deps section of the styx.yaml file.

@jyp
Copy link
Owner

jyp commented Feb 3, 2017

(The patch is merged into the trunk btw)

@jyp
Copy link
Owner

jyp commented Feb 6, 2017

Looking into it, I see that there is a difficulty with external libraries, which must be passed to cabal2nix and re-extracted. For reference, here is the code for glpk-hs in nixpgks:

 "glpk-hs" = callPackage
    ({ mkDerivation, array, base, containers, deepseq, gasp, glpk, mtl
     }:
     mkDerivation {
       pname = "glpk-hs";
       version = "0.5";
       sha256 = "a36ed027a55343864388f6c301279a2fb3ec06e7929f369e386120db7d2c99e9";
       libraryHaskellDepends = [ array base containers deepseq gasp mtl ];
       librarySystemDepends = [ glpk ];
       description = "Comprehensive GLPK linear programming bindings";
       license = stdenv.lib.licenses.bsd3;
     }) {inherit (pkgs) glpk;};

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