All Projects → fghibellini → Nix Haskell Monorepo

fghibellini / Nix Haskell Monorepo

Pragmatic tutorial on how to use nix with a haskell monorepo

Labels

Projects that are alternatives of or similar to Nix Haskell Monorepo

Homies
linux package management
Stars: ✭ 86 (-22.52%)
Mutual labels:  nix
Stack2nix
Generate nix expressions for Haskell projects
Stars: ✭ 93 (-16.22%)
Mutual labels:  nix
Nixos Config
Mirror of https://code.balsoft.ru/balsoft/nixos-config
Stars: ✭ 100 (-9.91%)
Mutual labels:  nix
Rules nixpkgs
Rules for importing Nixpkgs packages into Bazel.
Stars: ✭ 88 (-20.72%)
Mutual labels:  nix
Pre Commit Hooks.nix
Seamless integration of https://pre-commit.com git hooks with Nix.
Stars: ✭ 92 (-17.12%)
Mutual labels:  nix
Hydra Tutorial
Sample configuration files for setting up your own Hydra continuous integration server.
Stars: ✭ 95 (-14.41%)
Mutual labels:  nix
Cachix Action
Build software only once and put it in a global cache
Stars: ✭ 85 (-23.42%)
Mutual labels:  nix
Nix Home
Utilities for working with user configurations in Nix.
Stars: ✭ 107 (-3.6%)
Mutual labels:  nix
Ghc.nix
Nix (shell) expression for working on GHC
Stars: ✭ 94 (-15.32%)
Mutual labels:  nix
Nix Linter
Linter for the Nix expression language
Stars: ✭ 100 (-9.91%)
Mutual labels:  nix
Bauer
An Emacs+Nix IDE
Stars: ✭ 89 (-19.82%)
Mutual labels:  nix
Nix Processmgmt
Experimental Nix-based process management framework
Stars: ✭ 92 (-17.12%)
Mutual labels:  nix
Nixcloud Webservices
This nixpkgs extension, called nixcloud-webservices, focuses on ease of deployment of web-related technologies.
Stars: ✭ 98 (-11.71%)
Mutual labels:  nix
Vuizvui
Nix(OS) expressions used by the OpenLab and its members
Stars: ✭ 87 (-21.62%)
Mutual labels:  nix
Cached Nix Shell
Instant startup time for nix-shell
Stars: ✭ 103 (-7.21%)
Mutual labels:  nix
Nixos Configs
My NixOS configs
Stars: ✭ 86 (-22.52%)
Mutual labels:  nix
System
My system configuration
Stars: ✭ 94 (-15.32%)
Mutual labels:  nix
Powerline Rs
GitLab: https://gitlab.com/jD91mZM2/powerline-rs
Stars: ✭ 108 (-2.7%)
Mutual labels:  nix
Nix Tree
Interactively browse the dependency graph of your Nix derivations.
Stars: ✭ 104 (-6.31%)
Mutual labels:  nix
Styx
Static site generator in Nix expression language.
Stars: ✭ 99 (-10.81%)
Mutual labels:  nix

Nix Haskell Monorepo Tutorial

I recently tried to create Nix setup for our Haskell monorepo at work. This tutorial documents the whole process. This is still experimental and any feedback is very welcome. If you find it hard to understand some part just open an issue.

I absolutely recommend reading first Gabriel's tutorial on how to use Nix with Haskell in general.

Even though you end up with a project that can be fully built with Nix, chapter 5. shell.nix describes how you can use Nix to only provision your dependencies and use only Cabal and its v2- multi-package API to manage your build during development completely transparently.

  1. pinned nixpkgs
  2. monorepo nix expressions
  3. extra deps
  4. system deps
  5. shell.nix
  6. setting up a hydra instance
  7. hydra project config
  8. nix tests
    1. simple test
    2. multiple machines
    3. generating tests
    4. testing the docs
  9. docker images
  10. developer ergonomy
    1. checking that caching works
    2. prefetch-nixpkgs.sh
    3. IDEs
    4. making sure Cabal, Stack and Nix use the same versions

Why?

What can you gain by following this tutorial:

  • easy to write, integration test-suites
  • cached package-builds across machines
  • self-contained project description - no need to list system dependencies in a readme
  • reproducibility
  • easily bootstrappable local enrionment ??? TBD
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].