25 Commits

Author SHA1 Message Date
Yvan Sraka 8309423b1a Fix #518: examples in documentation need to be tested (#1714) 2022-10-06 10:36:38 +02:00
Thomas Vellekoop 022504e723 Fix use of no longer supported GHC version. (#1618) 2022-08-26 16:22:00 +01:00
Danila Danko 9c697ee23a [...] explanation (#1589) 2022-08-15 21:10:03 +12:00
Hamish Mackenzie b1661f08e3 Update cache server in docs to cache.iog.io (#1481) 2022-05-24 17:30:13 +12:00
Daniel Goertzen e4248b3f14 fix binary cache for nixos (#1448)
* fix binary cache for nixos

* Update getting-started.md

add nixos binary cache instruction for both <=21.11 and >21.11
2022-04-21 17:06:28 +01:00
Stefan Frijters b4b6bd387d Fix links to troubleshooting Markdown pages (#1443) 2022-04-19 12:42:34 +12:00
Ian 9fae2eb97f Replace deprecated NixOS binary cache settings (#1410)
`nix.binaryCachePublicKeys` and `nix.binaryCaches` are now deprecated in NixOS: the current names for these settings are `nix.settings.trusted-public-keys` and `nix.settings.substituters`, respectively
2022-03-21 16:27:36 +00:00
J.R. Hill 355cd3701d Fix minor typo (#1360) 2022-02-04 10:08:10 +00:00
visortelle 8c71436914 Fix getting-started.md for MacOS (#1283) 2021-11-05 11:50:42 +13:00
Pierre Penninckx 2e8af6c7b6 Fix wrong default.nix if following instructions blindly (#1148)
When copy-pasting the modified lines to the `default.nix` file, it will produce the following error:
`error: cannot coerce a set to a string, at [...]/default.nix`

Making the changes makes it work. Actually, the lines above (untouched in this PR) `fetchTarball "[...]/master.tar.gz"` were correct alread.
2021-06-24 20:55:10 +12:00
Hamish Mackenzie 18979e4745 Update getting started guide and shellFor (#951) 2021-04-09 00:12:00 +12:00
Jun Matsushita 4b8dd307d7 Fix nixpkgs version (#1052) 2021-02-21 18:22:42 +13:00
Marek Fajkus 62bb4dfd3a fix link to troubleshooting section (#1016) 2021-01-25 11:27:24 +13:00
Bill Ewanick 0c3689b028 Update Getting Started for NixOS users (#998)
* Update getting started for NixOS users

Based on the file that writes nix.conf, and visual inspection, these settings update the nix.conf on NixOS as specified.

* Better tutorial structure

responding to feedback
2021-01-19 09:39:11 +08:00
Hamish Mackenzie a9584f36e2 Add projectCross to projects (like pkgsCross) (#946)
This change adds a `projectCross` attribute to the return value of
the project functions.  It is similar to `pkgs.pkgsCross` and makes
it easier to build cross compiled versions of project (or get
a cross compile with `p.projectCross.${platform}.shellFor`).
2020-11-30 15:42:05 +13:00
Hamish Mackenzie 5f80ca910b Add compiler-nix-name arg to stackProject (#897) 2020-10-28 22:11:14 +13:00
Michael Peyton Jones 1250f0449d Improve binary caching documentation, make more salient (#875)
People constantly ask about this, clearly without having found the
documentation that we do have about this. So we need to make it more
obvious:
- Simplify the setup documentation to emphasize the Hydra cache (which
is the only working one currently).
- Move the cache troubleshooting section to the top to make it more
obvious.
- Highlight a link to the troubleshooting section of the docs in the
README.
- Emphasize that there is more documentation than is linked in the
README.
- Add a section to the README that explicitly mentions cache issues, and
links to the corresponding sections of the docs.
2020-10-13 15:37:04 +13:00
Asad Saeeduddin 3250b6cc7b Suggest adding Hydra substituter in docs (#823)
It seems [Hercules CI](https://hercules-ci.com/github/input-output-hk/haskell.nix) is having some problems, which means build outputs might not be available via the Cachix substituter.
2020-08-31 21:06:40 +12:00
Hamish Mackenzie cacfba0b45 Replace ghc 8.8.3 with 8.8.4 (#766)
Also adds some tooling/docs for adding new ghc versions (see `docs/adding-new-ghc.md`)
2020-07-21 14:10:23 +12:00
Hamish Mackenzie 4cac8bd00f Remove internal deps on default ghc and stackage (#738)
Changes to the interface of haskell.nix (from the changelog.md file):

* Removed `sources.nixpkgs-default`, use `sources.nixpkgs` instead.
* Removed `./nixpkgs` directory, use  `(import ./. {}).sources`
  or `./nix/sources.nix` instead.
* Removes V1 interface for details on how to fix old code see:
    https://github.com/input-output-hk/haskell.nix/issues/709
* Removed defaultCompilerNixName.
* cabalProject, cabalProject', hackage-project and hackage-package
  now require a `compiler-nix-name` argument.
* `haskell-nix.tool` and `.tools` now require a `compiler-nix-name` argument.
  New functions `p.tool` and `p.tools` (where p is a project) do not.
  Like `shellFor { tools = ... }` they will use the compiler nix name
  from the project (including stack projects where it is derived from
  the resolver).
* `haskell-nix.alex` and `haskell-nix.happy` have been removed. Use
  `p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`.
* `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes
  the hpack exe now).
* `haskell-nix.cabal-install` -> 
  `p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`
* `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots`

Other changes:

Adds hpack executable to the nix-tools derivations.

Adds a `cabal-hpack` test to make sure `hpack` works with
`cabalProject`.

Reduces the number of calls to `cabalProject` (particularly when
checking materialization), by giving internal tools a per-compiler
attribute.

Uses happy 1.19.12 when building newer ghc versions.

Updates cabal-install 3.2.0.0 to use the source from github that
is compatible with ghc 8.10.1.

Updates the docs for callCabalProjectToNix.

Adds a license mapping to fix a common warning.
2020-07-08 22:54:01 +12:00
Domen Kožar 33445e4fb9 Add project, cabalProject, stackProject references (#753)
* Add project, cabalProject, stackProject references

* Update docs/reference/library.md

Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>

Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
2020-07-08 21:25:24 +12:00
Toon Nolten 5c4a0de2a1 Minor documentation fixes (#722)
* Make the haskell.nix import in the examples explicit

The examples used `import ./. {}` without explaining the commands should
be run from the haskell.nix repo root. To avoid confusion like this I
added fetching a tarball of the repo. This is less efficient when run
from the repo but works when run from anywhere and makes it clear we're
importing haskell.nix.

Added a couple urls and removed the urls on the lens component so as not
to confuse components with packages.

* Fix rephrase

The phrasing was left in a partially-rewritten state.

* Change wording and fix typo

* Minor fixes for consistency
2020-06-23 08:10:41 +10:00
Domen Kožar 1383a63ff6 fix getting started example and simplify (#711) 2020-06-19 21:15:07 +12:00
Hamish Mackenzie 9e6820cc71 Add haskell-nix.project (and project') (#703)
Generalized version of the `cabalProject` and `stackProject`
functions.

Automatically selects the correct project type based on the
`projectFileName` argument if provided or what files exist in
the `src` directory if no `projectFileName` was specified.

If it cannot be determined which it should use the following
error message is given:

```
error: haskell-nix.project : both `stack.yaml` and `cabal.project` files exist set `projectFileName = "stack.yaml;"` or `projectFileName = "cabal.project";`
```
2020-06-19 20:07:19 +12:00
Domen Kožar 2852a9521f Reorganize tutorials (#702)
* fix hackage and stackage to work

* user-guides -> tutorials

* Restructure tutorials

* getting-started: clarify on packages and components

* Update docs/tutorials/development.md

Co-authored-by: Rodney Lorrimar <dev@rodney.id.au>

* getting-started: bail out if cabal.project and stack.yaml are present

* hackage-stackage: delete duplicated content

Co-authored-by: Rodney Lorrimar <dev@rodney.id.au>
2020-06-19 13:37:02 +12:00