-
Notifications
You must be signed in to change notification settings - Fork 247
Reorganize tutorials #702
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
Merged
Merged
Reorganize tutorials #702
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b382dd0
fix hackage and stackage to work
domenkozar 0963b03
user-guides -> tutorials
domenkozar f951513
Restructure tutorials
domenkozar 7e17064
getting-started: clarify on packages and components
domenkozar f7ab391
Update docs/tutorials/development.md
domenkozar 306621c
getting-started: bail out if cabal.project and stack.yaml are present
domenkozar 4c76a6b
hackage-stackage: delete duplicated content
domenkozar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
# Build a specific package from hackage or a [stackage][] lts or nightly set. | ||
|
||
To build a package, say [lens][], from a stackage snapshot, say [lts-13.28][], | ||
you could run | ||
```bash | ||
nix build '(with import <nixpkgs> (import ./. {}).nixpkgsArgs; haskell-nix.snapshots."lts-13.28").lens.components.library' | ||
``` | ||
which would build the [lens][] library component from the lens package as fixed | ||
by the [lts-13.28][] stackage snapshot. | ||
|
||
## Specific version | ||
|
||
To build any package from hackage, say [lens][], in version, say 4.17.1, you | ||
could run | ||
```bash | ||
nix build '(with import <nixpkgs> (import ./. {}).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; })).components.library' | ||
``` | ||
which would build the [lens][] library component from the [lens-4.17.1][] package | ||
from hackage. | ||
|
||
## Pinning hackage index | ||
|
||
The dependencies would be solved against the most recent | ||
[hackage-index-state][] that comes via the [hackage.nix][] pin with your | ||
[haskell.nix][] checkout. A specific one can be specified as well: | ||
```bash | ||
nix build '(with import <nixpkgs> (import ./. {}).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; index-state = "2019-07-14T00:00:00Z"; })).components.library' | ||
``` | ||
which would use the hackage index as of `2019-07-14T00:00:00Z` to produce a build plan | ||
for the [lens-4.17.1][] package. | ||
|
||
[stackage]: https://stackage.org | ||
[hackage.nix]: https://github.com/input-output-hk/hackage.nix | ||
[lts-13.28]: https://www.stackage.org/lts-13.28 | ||
[lens]: https://hackage.haskell.org/package/lens | ||
[lens-4.17.1]: https://hackage.haskell.org/package/lens-4.17.1 | ||
[hackage-index-state]: https://github.com/input-output-hk/hackage.nix/blob/master/index-state-hashes.nix |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.