-
Notifications
You must be signed in to change notification settings - Fork 259
Open
Labels
documentationeasyenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededpreservedKeep stale bot awayKeep stale bot away
Description
The tool and tools features (haskell-nix.tool(s), the shellFor.tools argument and shell.tools) are not well covered by the documentation. However there is a comment in the code. We should update the documentation to cover this and also discuss alternatives (using haskell-nix.hackage-package, haskell-nix.hackage-project and haskell-nix.cabalPackage directly).
haskell.nix/overlays/tools.nix
Lines 1 to 39 in 3473e3c
| # This overlay helps accessing common executable components. | |
| # Typically we want to make these available in a nix-shell | |
| # created with shellFor. In most cases the package name | |
| # will be the same as the executable, but we have a | |
| # `toolPackageName` and `packageToolName` mapping to help | |
| # when it is not. | |
| # | |
| # To get a single tool: | |
| # haskell-nix.tool "ghc884" "cabal" "3.2.0.0" | |
| # | |
| # This does the same thing as: | |
| # (haskell-nix.hackage-package { | |
| # compiler-nix-name = "ghc884"; | |
| # name = "cabal-install" | |
| # version = "3.2.0.0" | |
| # }).components.exes.cabal | |
| # | |
| # To get an attr set containing multiple tools: | |
| # haskell-nix.tools "ghc884" { cabal = "3.2.0.0"; hlint = "2.2.11"; } | |
| # | |
| # To add tools to a shell: | |
| # shellFor { tools = { cabal = "3.2.0.0"; hlint = "2.2.11"; }; } | |
| # | |
| # When used in shellFor the tools will be compiled with the same version | |
| # of ghc used in the shell (the build ghc in the case of cross compilation). | |
| # | |
| # To get tools for use with project `p` without using shellFor: | |
| # p.tool "cabal" "3.2.0.0" | |
| # p.tools { cabal = "3.2.0.0"; hlint = "2.2.11"; } | |
| # (the ghc version used to build it will match the one used in the project) | |
| # | |
| # Instead of a version string we can use an attr set containing | |
| # arguments that will be passed to `cabalProject`. | |
| # | |
| # For instance to add haskell.nix modules. Use: | |
| # haskell-nix.tool "ghc884" "cabal" { | |
| # version = "3.2.0.0"; | |
| # modules = [ ... ]; | |
| # } |
AleXoundOS
Metadata
Metadata
Assignees
Labels
documentationeasyenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededpreservedKeep stale bot awayKeep stale bot away