Giter Site home page Giter Site logo

Comments (5)

Gabriella439 avatar Gabriella439 commented on August 16, 2024

@asheshambasta: The short answer is that you can fix the problem by running:

$ nix-shell --attr avahi-dbus.env release.nix

The issue here is that running nix-shell directly on the derivation for the Haskell derivation does not behave well (unlike almost all other Nix packages). Instead, every Haskell derivation has an env attribute that you have to use nix-shell on instead. See the beginning of this section for more details:

https://github.com/Gabriel439/haskell-nix/tree/master/project0#building-with-cabal

from haskell-nix.

asheshambasta avatar asheshambasta commented on August 16, 2024

@Gabriel439 thanks a lot for clarifying this. This indeed fixes the issue.
Is there a more detailed resource on why this is with Haskell packages?

I'm closing this issue since this seems fixed for me.
Apologies for a question-issue.


Maybe we can add to the readme that if the package name is A, the user has to pass --attr A.env instead of env, which is what seems to have stumped me.


Interestingly, as per the changes in my minimal repro repo., adding a shell.nix with the given buildInputs seems to work. I'm not entirely sure why that is.

from haskell-nix.

Gabriella439 avatar Gabriella439 commented on August 16, 2024

@asheshambasta: There isn't an explanation of why this is the case. That idiom is taken from the Haskell section of the Nixpkgs manual, but it doesn't explain the rationale behind it.

from haskell-nix.

asheshambasta avatar asheshambasta commented on August 16, 2024

@Gabriel439 Thanks for the link. I'll read it and respond back.

I'm not sure where else to ask, but following: https://github.com/Gabriel439/haskell-nix/blob/master/project2/README.md, I've added the zlib (instead of tar in the README) dependency in the avahi-dbus.nix, but builds still fail with the extra-libraries option in the cabal file.
I've added a commit that demonstrates this: asheshambasta/avahi-dbus@f8a3423

from haskell-nix.

Gabriella439 avatar Gabriella439 commented on August 16, 2024

@asheshambasta: I believe you need to depend on zlib.dev instead of zlib. zlib contains just the shared library files, whereas zlib.dev includes the header files, too, which is what cabal is looking for.

from haskell-nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.