GithubHelp home page GithubHelp logo

shamash2014 / nix-haskell-monorepo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fghibellini/nix-haskell-monorepo

0.0 1.0 0.0 515 KB

Pragmatic tutorial on how to use nix with a haskell monorepo

Shell 29.03% Haskell 2.05% Nix 68.92%

nix-haskell-monorepo's Introduction

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
  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

nix-haskell-monorepo's People

Contributors

fghibellini avatar

Watchers

Roman Myronov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.