Commit Graph

135 Commits

Author SHA1 Message Date
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
Michael Peyton Jones
738af22ce9
Move more CI to 20.09 (attempt 2) (#975)
* Update default nixpkgs to 20.09

* Move more CI to work on 20.09 by default

* IFD level 1

* Use nixpkgs 20.03 emscripten (needed for ghcjs)

* Add missing materialized files

* Add missing materialized files

* Fix for ghc 8.8 build on darwin

* Fix for ghcjs 8.8 build on darwin

* Fix hls stack test eval for ghc810220201118

* ifdLevel 2

* Oops: accidentally turned on tests for experimental GHC

* Revert "Fix hls stack test eval for ghc810220201118"

This reverts commit b405cd7ee8bd62214bd2d0a61e0317673b5bf1b5.

* ifdLevel 3

* Disable GHC 8.6.5 windows cross on nixpkgs 20.09

* Update supported GHC doc with a table

* Add emscripten comment

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2020-12-17 15:57:09 +00:00
Rodney Lorrimar
d6e47d8b50
Bump nix-tools to latest master (#955)
* Bump nix-tools to latest master

* Add docs for checking nix-tools materialization

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2020-12-03 22:53:15 +13: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
Michael Peyton Jones
20b6629205
Drop 19.09 support (#947)
* Drop 19.09 support

This is a year old. NixOS doesn't even support the last stable release,
let alone the one before that.

Also cuts our CI size by a third, which is always nice.

* Remove 19.09 compatibility pieces
2020-11-27 10:34:31 +13:00
Hamish Mackenzie
c0931c9a56
Replace otherShells with mkShell inputsFrom (#939)
It turns out the `otherShells` arg we added to `shellFor` is very
similar to the `inputsFrom` argument of `mkShell`.  We can use
`inputsFrom` instead having `otherShells` by replacing the use of
`mkDerivation` with `mkShell` in `shellFor`.
2020-11-26 21:15:27 +13:00
Hamish Mackenzie
5df5be0d08
Remove pj.hsPkgs.${n} functions in favour of pj.${n} (#938)
Applies to:

 * makeConfigFiles
 * ghcWithHoogle
 * ghcWithPackages
 * shellFor
2020-11-26 19:20:10 +13:00
Hamish Mackenzie
e729389f32
Add otherShells arg to shellFor (#937)
Makes it easier to include cross compilation shells.  The
buildInputs and nativeBuildInputs of the shells are added.
2020-11-24 16:28:45 +13:00
Artem Pelenitsyn
61546a5770
Fix broken link to official nixpkgs guide to Haskell infrastructure (#923) 2020-11-11 15:01:00 +13:00
Eric Wolf
0c3abc8a6d
Allow for hoogle to be materialized in shellFor (#902)
Allow for hoogle to be materialized in `shellFor` by using `tools.hoogle` when passed in.

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>
2020-10-31 20:46:54 +13:00
Michael Peyton Jones
134b60e48e
Troubleshooting: add a small section about stripping (#900) 2020-10-30 17:40:04 +13:00
Hamish Mackenzie
5f80ca910b
Add compiler-nix-name arg to stackProject (#897) 2020-10-28 22:11:14 +13:00