Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 9 additions & 10 deletions doc/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes
5 changes: 0 additions & 5 deletions doc/haskell-flake/test.sh

This file was deleted.

4 changes: 1 addition & 3 deletions doc/haskell-flake.md → doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]]#.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions doc/start.md
Original file line number Diff line number Diff line change
@@ -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.
36 changes: 2 additions & 34 deletions doc/haskell-flake/start.md → doc/under-the-hood.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.