* Delete flake.lock in docs to better catch issues in tests
* Fix#1757: test nix flake init --template "template#haskell-nix"
* Rewrite `buildkite` jobs for GitHub Action
* devshell: better definition of PKG_CONFIG_PATH
that manually going through pkg-config of all packages.
Also filter out non-derivation from nativeBuildInputs.
* Add project.projectVariants that apply flake.variants modules
* Move projectOverlays.devhshell to haskellLib.devshellFor
* Fix#1558: add flake template for `nix flake init`
This depends on https://github.com/NixOS/templates/pull/40
This issue makes both `nix run haskell-nix#hix -- init` and
`nix flake init --template haskell-nix#template --impure` do the same
thing!
* Update getting-started-flakes.md
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.
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.
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.
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.
`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
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.
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.
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.
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.
* 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.