Commit Graph

146 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
Deniz Dogan 127e423397 Fix duplicate ${system} in flake tutorial (#1729)
When I followed this tutorial, my default package ended up as `packages.aarch64-darwin.aarch64-darwin.default`. Removing this "extra" `${system}` solves the problem, but admittedly I'm not 100% sure what's going on here.
2022-10-03 11:06:53 +13:00
Hamish Mackenzie 11e2ff67a6 Update nix-tools-pin.md (#1628) 2022-08-30 09:28:34 +00:00
Thomas Vellekoop 022504e723 Fix use of no longer supported GHC version. (#1618) 2022-08-26 16:22:00 +01:00
Yvan Sraka 3c9acea8fe Fix #1581 & #1586: flake output attribute 'defaultPackage' and 'devShell' are deprecated (#1583)
Using 'packages.<system>.default' and 'devShells.<system>.default' instead
2022-08-18 08:01:52 +00:00
Hamish Mackenzie 638ed961a7 Remove nixpkgs 21.11 from CI and reduce tests (#1597)
The time taken to run CI is getting very long.  Hopefully removing nixpkgs 21.11 and no longer runs full tests for GHC 9.0.2 well make room for GHC 9.4.1.

Uses nixpkgs-unstable for broken out jobs.
2022-08-18 19:33:33 +12:00
Danila Danko 9c697ee23a [...] explanation (#1589) 2022-08-15 21:10:03 +12:00
Danila Danko 3a292d4a08 Update development.md (#1591) 2022-08-15 19:05:37 +12:00
George Thomas a6ce303abb Fix typo (#1584)
Looks like a copy-paste error from the shell config above.
2022-08-11 00:10:15 +12:00
Hamish Mackenzie 05c0555400 Add flake support to hix (#1572)
This adds support for using nix flakes commands with hix.  This is done by creating a hidden `.hix-flake` directory and passing the source in using `--override-input`.

It also includes a `hix init` command to add a `flake.nix` and `nix/hix.nix` configuration file.
2022-08-05 10:17:16 +12:00
Hamish Mackenzie c2f14344f1 Add ghc 9.2.4 (#1566) 2022-07-31 21:41:50 +12:00
Andrea Ciceri 2c1701b681 Supporting ca-derivations experimental feature (#1494)
* Supporting `ca-derivations` experimental feature

* Improved `contentAddressed.include` option description

* Ensure deterministic output for content addressed components

* Comment transformed into a Nix comment

To avoid possibly useless rebuilds

* Use `modules` arg `contentAddressed` flag

* Tutorial about CA derivations

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2022-06-23 12:39:35 +12:00
Hamish Mackenzie fa2fa131fe Add ghc 9.2.3 (#1491)
Also:

* Updates the GHC's built on CI
* Use Cabal 3.6.2.0 for default Setup
* Fixes haskell-language-server and hlint on CI
2022-06-01 19:33:58 +12:00
Hamish Mackenzie b1661f08e3 Update cache server in docs to cache.iog.io (#1481) 2022-05-24 17:30:13 +12:00
Jean-Baptiste Giraudeau b66b0445eb Allows project to be easily extended. (#1467)
* Allows project to be easily extended.

* Add common project overlays
2022-05-13 21:21:19 +12:00
endgame d44384cef1 supported-ghc-versions.md: We have 9.2.2 (#1452) 2022-04-23 14:38:06 +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
Tikhon Jelvis 8d607e1dd8 Fix typo in GHC versions table: ghc2105 → ghc2111 (#1445)
There's a typo in the table of supported versions: two of the 21.11 rows should say `nixpkgs-2111` rather than `nixpkgs-2105`. This threw me off for a bit earlier because I skimmed the table and thought 21.11 wasn't supported yet.
2022-04-19 12:43:38 +12:00
Stefan Frijters b4b6bd387d Fix links to troubleshooting Markdown pages (#1443) 2022-04-19 12:42:34 +12:00
Hamish Mackenzie 97b3a67789 Fix typo & comment out cross comp in eg. flake.nix (#1423) 2022-04-01 18:18:42 +13: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
Hamish Mackenzie fa2d8a9b6f Add ghc 9.2.2 (#1394) 2022-03-08 14:34:04 +13:00
J.R. Hill 355cd3701d Fix minor typo (#1360) 2022-02-04 10:08:10 +00:00
Hamish Mackenzie e95a1f0dac Update nixpkgs pins. Turn off CI for nixpkgs-2105 (#1308)
* Turn off haskell.nix tests for nixpkgs-2105
* nix flake lock --update-input the nixpkgs pins
* Update docs
2021-12-13 18:05:15 +13:00
Tom Prince a68a7dda41 Add nixos-21.11 builds. (#1304)
* Add nixos-21.11 builds.

* Remove references to nixpkgs-20.09.
2021-12-07 12:55:20 +13:00
Hamish Mackenzie 24b421cbfc Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
visortelle 8c71436914 Fix getting-started.md for MacOS (#1283) 2021-11-05 11:50:42 +13:00
Sridhar Ratnakumar fbbcda2d21 flakes tutorial: add buildInputs example (#1248)
Often I want to have non-haskell tools, like nixpkgs-fmt (used to format .nix files in IDE context), installed in the nix shell.
2021-09-27 19:12:03 +13:00
Jean-Baptiste Giraudeau 749a7dc068 Add appendModule function to projects. (#1240)
Allow re-eval of the project with an extra module (or module list).
2021-09-18 14:43:46 +12:00
Hamish Mackenzie 19052d83fd Expose config.nix for flakes to use (#1238) 2021-09-15 23:00:14 +12:00
Hamish Mackenzie 1f4c2c9b08 Add GHC 8.10.7 (#1220) 2021-09-01 22:43:31 +12:00
Teo Camarasu f624ca5662 Add GHC-8.10.6 (#1214)
Add GHC-8.10.6

Co-authored-by: Peter Becich <peter@simspace.com>
Co-authored-by: Teo Camarasu <teofilcamarasu@gmail.com>
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2021-08-31 04:19:40 +12:00
Sukant Hajra 1992b910e9 fix #1173: have CI build/cache GHC 8.10.4 (#1174)
The idea is to keep 8.10.4 in CI while 8.10.5 is still neither in
- a (non-nightly) Stackage LTS resolver
- upstream Nixpkgs-unstable

Hopefully it isn't long before 8.10.5 is more standard and we can remove
8.10.4 from the IOHK build.

This commit also updates documentation (which seems to have fallen out
of date), with some changes and additions to hopefully make things
easier on first-time readers.
2021-08-02 13:38:28 +12:00
Hamish Mackenzie 6b28399864 Add Hix wrappers for Nix tools (#1053)
The `hix` tools are wrappers for the various `nix` tools that
use `haskell.nix` without the need to add any `.nix` files.

This is useful for:

* A quick way to try out haskell.nix for new users.

* Using haskell.nix to work on projects that do not have
  `.nix` files.

* Testing to see if `haskell.nix` can build a project.

* Making `flake` and `non flake` configurations to check `haskell.nix`
  treats them the same.

The configuration arguments for `Hix` can be (from highest precedence to lowest):

* Passed on the command line with `--arg` (or `--argstr` for string args).

* Placed in `nix/hix.nix` file in the project dir.

* Placed in `~/.config/hix/hix.conf`

Boilerplate `default.nix`, `shell.nix` and `flake.nix` files can be added to a
a project with a `nix/hix.nix` file to make it work with the standard `Nix`
tools.
2021-06-26 17:58:06 +12: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 f279cdef5f Update the project modules and fix missing args param (#1144)
There are now 4 project modules used to check the arguments passed to the various project functions:

* `project-common.nix` - Arguments used by all the project functions
* `stack-project.nix` - Used by the `stackProject` and `stackProject'` functions
* `cabal-project.nix` - Used by the `cabalProject` and `cabalProject'` functions
* `project.nix` - Just the `projectFileName` argument that is used by `project` and `project'` functions to determine whether to call `stackProject` or `cabalProject` function.

This also includes the `rawProject.args` that was mistakenly left out of #1141 causing #1142 and improvements for the docs for the use of the `shell` argument in `flake.nix` files.
2021-06-20 18:00:22 +12:00
Hamish Mackenzie 91adf5f97d Add crossPlatforms arg to shellFor (#1089)
This makes it easier to get cross compilers for a project in a nix shell.
2021-04-16 17:50:10 +12:00
Hamish Mackenzie 18979e4745 Update getting started guide and shellFor (#951) 2021-04-09 00:12:00 +12:00
Arnaud Bailly 6c9facfada Update development.md (#1010)
Remove inheritance from `shell.nix` when defining `hsPkgs`. I tried following the tutorial on a new project and I had errors caused by this.
2021-03-18 20:04:55 +13:00
toonn 637302c647 doc/tutorial: Update materialization examples (#1040)
* doc/tutorial: Fix up materialization tutorial

Capitalize Nix everywhere, use consistent formatting of lists and fix
some typos.

* doc/tutorial: Update materialization examples

Update the practical examples of how to materialize a haskell.nix
project. The examples had aged to the point where they could no longer
be followed.
2021-03-18 20:04:21 +13:00
Jun Matsushita 400ad34de0 Add link to install nix-tools section (#1065) 2021-03-18 19:50:55 +13:00
Jun Matsushita 95e58db9cb Fix links to cabal docs (#1067) 2021-03-18 19:50:13 +13:00
Hamish Mackenzie 172d402394 Add more flakes support and getting started guide (#972)
This PR adds a `flake` function to haskell.nix projects.  It can
be used to transform the outputs of project into a flattened structure
that can be used to make a `flake.nix` file for your project.

Because the nix code and commands used are different a lot of stuff in
the getting-started.md will not work with a `flake.nix`.  So instead
of trying to add a flake section to that guide this PR adds a new
version for Nix Flake users.
2021-02-22 20:42:33 +13:00
Jun Matsushita 4b8dd307d7 Fix nixpkgs version (#1052) 2021-02-21 18:22:42 +13:00
Hamish Mackenzie 89f50a96dd Use pkgs.lib instead of stdenv.lib (#1031)
Fixes:

Warning: `stdenv.lib` is deprecated and will be removed in the next release. Please use `pkgs.lib` instead. For more information see https://github.com/NixOS/nixpkgs/issues/108938
2021-02-11 01:07:16 +13:00
Hamish Mackenzie cd91692380 GHC 8.10.4 (#1033)
* Adds GHC 8.10.4 support

* Drops GHC 8.8.3, 8.10.2 and 8.10.3 from CI

* Adds warning to encourage people to use less buggy ghc
2021-02-09 14:30:32 +13:00
Michael Peyton Jones 928bdb5449 Update and simplify version support table (#1028)
Only include stuff that is positively supported, makes it easier to
read.
2021-02-03 11:17:07 +00: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
paumr a045d79264 Updated system-nixpkgs-map.nix and a default for X11 package (fixes #984) (#988)
After investigating adding a project argument to override the
mapping of libs to packages we realised we could fix the X11
package by updating `modules/configuration-nix.nix`.

We also updated `system-nixpkgs-map.nix` to allow multiple
packages to be mapped for a single library (turned out not
to be necessary for X11).

Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2021-01-08 13:10:00 +13:00