All Projects → evertedsphere → Rien

evertedsphere / Rien

Licence: gpl-3.0
Predictable Haskell development environments with Cabal and Nix.

Labels

Projects that are alternatives of or similar to Rien

Base16 Zathura
base16 colors for zathura
Stars: ✭ 44 (-32.31%)
Mutual labels:  nix
Neutron
🌠 Purely functional Apache Pulsar client for Scala built on top of Fs2
Stars: ✭ 53 (-18.46%)
Mutual labels:  nix
Nixos Configurations
Stars: ✭ 58 (-10.77%)
Mutual labels:  nix
Rust Overlay
Pure and reproducible nix overlay for binary distributed rust toolchains
Stars: ✭ 46 (-29.23%)
Mutual labels:  nix
Idempotent Desktop
🛸 NixOS, Xmonad, Neovim
Stars: ✭ 51 (-21.54%)
Mutual labels:  nix
Nix Hs Hello Windows
Cross compiling Hello World (haskell) to Windows using nix.
Stars: ✭ 55 (-15.38%)
Mutual labels:  nix
Dotfiles
💻 Public repo for my personal dotfiles
Stars: ✭ 43 (-33.85%)
Mutual labels:  nix
Deckdeckgo
The web open source editor for presentations
Stars: ✭ 1,117 (+1618.46%)
Mutual labels:  nix
Microgram
ABANDONED
Stars: ✭ 52 (-20%)
Mutual labels:  nix
Homelab
Configuration management for Matt Layher's machines. MIT Licensed.
Stars: ✭ 57 (-12.31%)
Mutual labels:  nix
Workshops
Stars: ✭ 47 (-27.69%)
Mutual labels:  nix
Backerei
Automated reward payment & account management for Tezos bakers.
Stars: ✭ 51 (-21.54%)
Mutual labels:  nix
Nix Gitignore
superseded / unmaintained
Stars: ✭ 56 (-13.85%)
Mutual labels:  nix
Nixery
Container registry which transparently builds images using the Nix package manager
Stars: ✭ 1,023 (+1473.85%)
Mutual labels:  nix
Neovim Nightly Overlay
[[email protected]]
Stars: ✭ 60 (-7.69%)
Mutual labels:  nix
Rust Nightly Nix
A Nix expression for nightly Rust versions
Stars: ✭ 43 (-33.85%)
Mutual labels:  nix
Snabblab Nixos
NixOS configuration for the Snabb Lab
Stars: ✭ 53 (-18.46%)
Mutual labels:  nix
Dotfiles
well-tailored NixOS & nix-darwin dotfiles
Stars: ✭ 63 (-3.08%)
Mutual labels:  nix
Setup.nix
Nixpkgs based build tools for declarative Python packages [[email protected]]
Stars: ✭ 62 (-4.62%)
Mutual labels:  nix
Hs Nix Template
A Haskell project template that can be built with nix and developed by ghcid and cabal-install.
Stars: ✭ 57 (-12.31%)
Mutual labels:  nix

rien = predictable (haskell + cabal + nix)

  • create and work with Cabal-based Haskell development environments using Nix
  • use locally installed versions of development tools like ghc-mod etc

Eventually intended to be a good Stack replacement.

This is not even in alpha yet, and the only testing it gets is with GHC 8.2.2.

PRs and issues against other GHC versions are welcome!

Example: create a new project

# Create the directory and initialize a Git repo:
mkdir foo && cd foo && git init

# Add `rien` as a submodule to your Git repo:
git submodule add https://github.com/mrkgnao/rien .rien/

# Create a nixpkgs lock-file:
nix-prefetch-git https://github.com/NixOS/nixpkgs.git > nixpkgs.json

# Create a shell.nix and modify according to taste:
cp .rien/shell.template.nix shell.nix

# Enter a Nix shell with Cabal and ghc installed:
nix-shell

# Now we create a Cabal project and build it.
cabal init
cabal build

You can then run the application (if you built an executable):

$ cabal run foo
Hello, Haskell!

ghc-mod

ghc-mod will be installed fine on GHC 8.2.2 if you just add ghc-mod to your deps list, but it will have trouble finding the path to the cabal-helper-wrapper executable, which it needs in order to work. To fix this, just source the included setup-ghc-mod.sh script as follows:

$ nix-shell
$ source .rien/setup-ghc-mod.sh

and you should be good to go.

Example setup

let 
  rien = import .rien/rien.nix {
    packageName = "hello-world";
    packagePath = ./.;

    # Instead of using <nixpkgs>, use a lock-file to stick to
    # a particular `nixpkgs` commit.
    nixpkgsLock = ./nixpkgs.json;

    ghcVersion = "ghc822";

    overrides = {
      # I don't want to use Brittany as a library!
      justStaticExecutables = [ "brittany" ];
    };
  };

in
  rien.shell {
    # Generate Hoogle documentation?
    wantHoogle = true;

    # Haskell dependencies
    deps = hsPkgs: with hsPkgs; [
      brittany
    ];

    # Optionally, also add sets of related packages that are
    # commonly used together.
    depSets = hsPkgs: with (rien.package-sets hsPkgs); [
      trifectaFull
      conduitFull
      pretty-printing
    ];

    # Native dependencies
    nativeDeps = pkgs: with pkgs; [
      z3
      llvm
    ];
  }

Credits

Lots of code is from haskell-nix and clash-playground.

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