Skip to content

Instantly share code, notes, and snippets.

@boj
Created July 18, 2019 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boj/fb268565752d0ee856efd45e0b41c2be to your computer and use it in GitHub Desktop.
Save boj/fb268565752d0ee856efd45e0b41c2be to your computer and use it in GitHub Desktop.
Example shell.nix for Haskell dev
{ compiler ? "ghc865" }:
let
nixpkgs = import <nixpkgs> {};
inherit (nixpkgs) pkgs stdenv;
in
# Make a new "derivation" that represents our shell
stdenv.mkDerivation {
name = "communication-dev";
# The packages in the `buildInputs` list will be added to the PATH in our shell
buildInputs = [
pkgs.cabal-install
pkgs.haskell.compiler.${compiler}
pkgs.postgresql
pkgs.xz
pkgs.zlib
];
LIBRARY_PATH = "${pkgs.xz.out}/lib:${pkgs.zlib}/lib";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment