diff --git a/README.md b/README.md index 037961c..0a673ad 100644 --- a/README.md +++ b/README.md @@ -6,27 +6,23 @@ operating systems (and architectures). It requires [`nix` to be installed](https://nixos.org/download.html). -Once you have `nix` installed you can check that everything is working correctly: +Once you have `nix` installed, you can check that everything is working correctly: * Make sure to add `experimental-features = nix-command flakes` and `accept-flake-config = true` lines to `$XDG_CONFIG_HOME/nix/nix.conf` file ; * Make sure your `$USER` is trusted `nix show-config | grep trusted-users`, otherwise add it to `/etc/nix/nix.conf` and restart `nix-daemon` ; * Make sure the `nix-daemon` is running using `systemctl status nix-daemon` (if your OS is `systemd`-based). -Once you have `nix`, (linux, macOS, windows WSL) you can use - +Once you have `nix`, (Linux, macOS, windows WSL) you can use: ```bash nix develop github:input-output-hk/devx#ghc96 --no-write-lock-file --refresh ``` -to obtain a haskell evelopment shell for GHC 8.10.7 including `cabal-install`, -as well as `hls` and `hlint`. If you are on macOS on an apple silicon chip (M1, M2, ...), +Then, to obtain a haskell development shell for GHC 8.10.7 including `cabal-install`, +as well as `hls` and `hlint`. If you are on macOS on an Apple Silicon chip (M1, M2, ...), and want to switch between Intel (x86_64) and Apple Silicon (aarch64), you can do this by simply passing the corresponding `--system` argument: - ```bash nix develop github:input-output-hk/devx#ghc810 --no-write-lock-file --refresh --system x86_64-darwin -``` -or -```bash +# ... or: nix develop github:input-output-hk/devx#ghc810 --no-write-lock-file --refresh --system aarch64-darwin ``` @@ -64,44 +60,55 @@ To make this developer shell available in VSCode DevContainer or GitHub CodeSpac ``` This configuration will work immediately in GitHub CodeSpace! For local VSCode DevContainer, you need Docker and the [VSCode extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). For guidance on this, you can follow the [Microsoft tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial). -It's also advise to enable GitHub CodeSpace prebuilds in your repository settings, follow the instructions provided in the [GitHub documentation](https://docs.github.com/en/codespaces/prebuilding-your-codespaces/configuring-prebuilds). This will significantly enhance your development experience by reducing the setup time when opening a new CodeSpace. +It's also advised to enable GitHub CodeSpace prebuilds in your repository settings, follow the instructions provided in the [GitHub documentation](https://docs.github.com/en/codespaces/prebuilding-your-codespaces/configuring-prebuilds). This will significantly enhance your development experience by reducing the setup time when opening a new CodeSpace. -List of images available: `ghc810-iog`, `ghc96-iog`, `ghc810-js-iog`, `ghc96-js-iog`, `ghc810-windows-iog`, `ghc96-windows-iog` +List of images available: `ghc810-iog`, `ghc96-iog`, `ghc810-js-iog`, `ghc96-js-iog`, `ghc810-windows-iog`, `ghc96-windows-iog`. -## Compilers and Flavours +## Compilers and Flavors There are multiple compilers available, and usually the latest for each series from 8.10 to 9.6 (a slight delay between the official release announcement and the compiler showing up in the devx shell is expected due to integration work -necessary). The current available ones are: `ghc810`, `ghc90`, `ghc92`,`ghc94`, and +necessary). The current available ones are: `ghc810`, `ghc90`, `ghc92`, `ghc94`, and `ghc96` (these are the same ones as in [haskell.nix](https://github.com/input-output-hk/haskell.nix) and may contain patches for defects in the official releases). -### Flavours -There are various flavours available as suffixes to the compiler names (e.g. `#ghc810-minimal-iog`). +### Flavors + +There are various flavors available as suffixes to the compiler names (e.g. `#ghc810-minimal-iog`). -| Flavour | Description | Example | Included | +| Flavor | Description | Example | Included | | - | - | - | - | | empty | General Haskell Dev | `#ghc810` | `ghc`, `cabal-install`, `hls`, `hlint` | | `-iog` | IOG Haskell Dev | `#ghc810` | adds `sodium-vrf`, `blst`, `secp256k1`, `R`, `postgresql` | | `-minimal` | Only GHC, and Cabal | `#ghc810-minimal` | drops `hls`, `hlint` | -| `-static` | Building static binaries | `#ghc810-static` | static haskell cross compiler | -| `-js` | JavaScript Cross Compiler | `#ghc810-js` | javascript haskell cross compiler | -| `-windows` | Windows Cross Compiler | `#ghc810-windows` | windows haskell cross compiler | +| `-static` | Building static binaries | `#ghc810-static` | Static Haskell Cross-Compiler | +| `-js` | JavaScript Cross-Compiler | `#ghc810-js` | JavaScript Haskell Cross-Compiler | +| `-windows` | Windows Cross-Compiler | `#ghc810-windows` | Windows Haskell Cross-Compiler | -these can then be comined following this schema: +These can then be combined following this schema: ``` #ghc[-js|-windows|-static][-minimal][-iog] ``` -For example +For example: ```bash nix develop github:input-output-hk/devx#ghc810-windows-minimal-iog --no-write-lock-file --refresh ``` -would provide a development shell with a windows cross compiler as well as cabal, and the IOG specific libraries, but no Haskell Language Server (hls), and no HLint. +... would provide a development shell with a windows cross-compiler as well as cabal, and the IOG specific libraries, but no Haskell Language Server (`hls`), and no HLint. -A full list of all available `devShells` can be see with: +A full list of all available `devShells` can be seen with: ```bash nix flake show github:input-output-hk/devx ``` +## To Go Further + +### Customizing with `haskell.nix` + +The `devx` shell utilizes `haskell.nix` for a consistent development environment across platforms. Direct use of `haskell.nix` allows for greater customization by adapting Nix expressions to specific project needs, `haskell.nix` turn a Cabal or Stack projects into a Nix expression. For more details, see the [`haskell.nix` documentation](https://input-output-hk.github.io/haskell.nix/). + +### Automating with IOG GitHub Actions + +The `devx` GitHub Action, alongside other IOG-provided actions, supports automated workflows for Haskell projects. More information can be found in the [IOG GitHub Actions repository](https://github.com/input-output-hk/actions). + > [!NOTE] > For commercial support, please don't hesitate to reach out at devx@iohk.io