doc: Flatten index note (#224)

This commit is contained in:
Sridhar Ratnakumar 2024-02-09 12:50:52 -05:00 committed by GitHub
parent f9d17c3aa6
commit c5b36777ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 51 additions and 53 deletions

View File

@ -2,7 +2,7 @@
# haskell-flake - Manage Haskell projects conveniently with Nix
<img src="./doc/haskell-flake/haskell-flake.webp" width=100 />
<img src="./doc/haskell-flake.webp" width=100 />
There are [several ways](https://nixos.asia/en/haskell) to manage Haskell packages using [Nix](https://nixos.asia/en/nix) with varying degrees of integration. `haskell-flake` makes Haskell development, packaging and deployment with Nix flakes a lot [simpler](https://community.flake.parts/haskell-flake/start#under-the-hood) than other existing approaches. This project is set up as a modern [`flake-parts`](https://flake.parts/) module to integrate easily into other Nix projects and shell development environments in a lightweight and modular way.

View File

@ -56,16 +56,15 @@
]
},
"locked": {
"lastModified": 1702334080,
"narHash": "sha256-zrtzyLrSORxtocLMji5U9p4pDicMulOqgsuiB4LCu1o=",
"lastModified": 1707484760,
"narHash": "sha256-2wHRjoFJUpVnH7H/80bnaw8h3WELZqP9dM6DfjXWtAo=",
"owner": "srid",
"repo": "ema",
"rev": "33f4cf31ace7e612e78ad25f5fc45089745ab644",
"rev": "e3539ddd27b72a6bb90c8614ae63c70ff3351936",
"type": "github"
},
"original": {
"owner": "srid",
"ref": "no-ws",
"repo": "ema",
"type": "github"
}
@ -86,11 +85,11 @@
"unionmount": "unionmount"
},
"locked": {
"lastModified": 1705667811,
"narHash": "sha256-ZH/m5e4l4v2HRcv45trQKl92PRG6e1lpRJ4+U4zewL8=",
"lastModified": 1707492649,
"narHash": "sha256-CxW8dw/knjI1k1deF9c1QkFCkvn1QCc8JzEmcnluFH0=",
"owner": "srid",
"repo": "emanote",
"rev": "bf573e7653d183baa0fa68e2e172333f585b7a25",
"rev": "9849d42910bfc1a52acae4e3e93e7588811edb3c",
"type": "github"
},
"original": {
@ -166,11 +165,11 @@
"heist-extra": {
"flake": false,
"locked": {
"lastModified": 1691619499,
"narHash": "sha256-4e8v5t4FM99pdcPhohP3dAeGtsFnirbfYGpbr2+qWxI=",
"lastModified": 1706086475,
"narHash": "sha256-scXMVFKSaS4Wi4y6I84oPKHaTmLECsvq8eLxGL0XH5o=",
"owner": "srid",
"repo": "heist-extra",
"rev": "54ff970f733dd45b5509d1c4c298927b6241041b",
"rev": "c6d8ef79b415fab276fb461d5860bbf2628e6e43",
"type": "github"
},
"original": {

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -1,5 +0,0 @@
source ../test/common.sh
nix build ${OVERRIDE_HASKELL_FLAKE} \
--option log-lines 1000 --show-trace \
"github:hercules-ci/flake.parts-website#checks.${SYSTEM}.linkcheck"

View File

@ -9,9 +9,7 @@ emanote:
# Haskell development using `haskell-flake`
[haskell-flake](https://github.com/srid/haskell-flake) is a [flake-parts](https://flake.parts/) module to make Haskell development [simpler](haskell-flake/start.md#under-the-hood) with [Nix](https://nixos.asia/en/nix).
[haskell-flake](https://github.com/srid/haskell-flake) is a [flake-parts](https://flake.parts/) module to make Haskell development [[under-the-hood|simpler]] with [Nix](https://nixos.asia/en/nix).
To get started, see [[start]]# and thereon see [[guide]]#. To get inspired, see [[examples]]#. For reference, see [[ref]]#.

38
doc/start.md Normal file
View File

@ -0,0 +1,38 @@
---
order: -10
---
# Getting Started
Before using `haskell-flake` you must first [install Nix](https://flakular.in/install).
## Existing projects
To use `haskell-flake` in an *existing* Haskell project, run:
```bash
nix flake init -t github:srid/haskell-flake
```
Open the generated `flake.nix` and change `self'.packages.example` to use your package name. For example, if your package is named `my-package` (with a `my-package.cabal` file), change `example` to `my-package`. Follow the comments along the `flake.nix` to make any necessary changes to the project configuration.
## New projects
To create a *new* Haskell project, instead, run:
```bash
mkdir example && cd ./example
nix flake init -t github:srid/haskell-flake#example
```
### Template
You may also use https://github.com/srid/haskell-template which already uses `haskell-flake` along with other opinionated defaults.
## Under the hood
![[under-the-hood]]
## Next steps
Visit [[guide]] for more details, and [[ref]] for module options.

View File

@ -1,35 +1,5 @@
---
order: -10
---
# Getting Started
Before using `haskell-flake` you must first [install Nix](https://flakular.in/install).
## Existing projects
To use `haskell-flake` in an *existing* Haskell project, run:
```bash
nix flake init -t github:srid/haskell-flake
```
Open the generated `flake.nix` and change `self'.packages.example` to use your package name. For example, if your package is named `my-package` (with a `my-package.cabal` file), change `example` to `my-package`. Follow the comments along the `flake.nix` to make any necessary changes to the project configuration.
## New projects
To create a *new* Haskell project, instead, run:
```bash
mkdir example && cd ./example
nix flake init -t github:srid/haskell-flake#example
```
### Template
You may also use https://github.com/srid/haskell-template which already uses `haskell-flake` along with other opinionated defaults.
## Under the hood
# Under the hood
>[!tip] Under the hood
> See [this tutorial](https://nixos.asia/en/nixify-haskell-nixpkgs) to understand what it takes to package a Haskell application without haskell-flake.
@ -43,6 +13,4 @@ In addition, compared to using plain nixpkgs, haskell-flake supports:
- Modular interface to `pkgs.haskell.lib.compose.*` (via `packages` and `settings` submodules)
- Composition of dependency overrides, and other project settings, via [[modules]]
## Next steps
Visit [[guide]] for more details, and [[ref]] for module options.
See #[[start]] for getting started with haskell-flake.