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

documentation: add sub-section for the nixpkgs manual Haskell section #41600

Merged

Conversation

mbbx6spp
Copy link
Contributor

@mbbx6spp mbbx6spp commented Jun 6, 2018

No description provided.

@chris-martin
Copy link
Contributor

chris-martin commented Jun 8, 2018

Thanks for drawing attention to this, I didn't know about it.

We should mention that the root directory name has to be the same as the name of the haskell package.

One correction: I think buildInputs = attrs.buildInputs // buildInputs; is supposed to be buildInputs = attrs.buildInputs ++ buildInputs; ?

To conceptually explain what this feature is for, would it be fair to recommend putting the examples you've written into a default.nix file, and likening that file roughly to what you'd use a stack.yaml for if you were using stack instead of nix to set up the build environment?

I don't understand the purpose of the buildInputs = [ zlib ]; part of the second example. I've been testing with libraries that depend on zlib (I'm building a project with scotty) and everything's been working fine without having to explicitly declare a zlib dependency anywhere in the nix setup.

@mbbx6spp mbbx6spp force-pushed the docs/add-developPackage-haskell-docs branch from af1e886 to a15d310 Compare June 21, 2018 20:00
@mbbx6spp
Copy link
Contributor Author

Thanks @chris-martin for the notes and thanks for your patience on my reply.

  1. I added the note that developPackage could be used as a simplified stack.yaml replacement.
  2. Yes, I made the correction, that is right (++ instead of //).
  3. I tried to explain the rationale for when you would need to override the derivation returned from developPackage to add buildInputs (when your package directly depends on those buildInputs, not just transitively).

@matthewbauer matthewbauer merged commit ba87c0f into NixOS:master Jun 29, 2018
@mbbx6spp mbbx6spp deleted the docs/add-developPackage-haskell-docs branch July 7, 2018 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants