Comments (5)
@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.
@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.
@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.
@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.
@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)
- project0: README.md: Text talks about LICENSE file being placed, expiriencing different result
- Changing the compiler to ghc784 help needed HOT 10
- Add example of initializing a new project from scratch HOT 5
- Error: file 'nixpkgs' was not found in the Nix search path HOT 5
- Error builing `project1`/`release1` HOT 3
- dhall-nix? HOT 7
- morte-1.7.1 in nixpkgs-19.09 is marked as broken HOT 5
- Re-running `nix-build release0.nix` does not incorporate changes HOT 3
- stack shares builds of deps HOT 1
- Cabal new- commands
- [question] What does jailbreak mean exactly? HOT 1
- Setup.hs error with defaultUserHooks HOT 4
- readme: broken link to cabal user's guide
- Development dependencies HOT 2
- Is this project up-to-date? Does the author still use this in production? HOT 1
- shell.nix should modernised.
- running in to "error: attribute 'lib' missing" while trying to nix-build release0.nix HOT 2
- Unable to Build project0 HOT 1
- $ nix-build release0.nix returns an error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskell-nix.