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

Document you can use a 'src' attribute in hackage-packages.nix #480

Merged
merged 3 commits into from Apr 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions doc/nixpkgs-users-guide.rst
Expand Up @@ -134,6 +134,22 @@ on that compiler. Also, the attributes ``haskell.compiler.ghcXYC`` and
``haskell.packages.ghcXYC.ghc`` are synonymous for the sake of
convenience.

How to install a branch of a package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

One of the nice things about Nix is that since nixpkgs contains all
information to build a package. This makes it easy to point a package
to a different branch of the source and have Nix build a package for
that branch.

Even though Haskell packages are typically generated based on the hackage
releases, because hackage contains source packages this is still possible
for hackage. You can simply add a ``src`` attribute to any of the entries
in ``hackage-packages.nix``.

This is of course not a long-term solution, as ``hackage-packages.nix``
is a generated file and your changes will be lost when it is regenerated.

How to create a development environment
---------------------------------------

Expand Down