Skip to content

Instantly share code, notes, and snippets.

@heathdrobertson
Last active November 14, 2019 01:10
Show Gist options
  • Save heathdrobertson/6c4d9f1799cae998454831bcfc21c4d6 to your computer and use it in GitHub Desktop.
Save heathdrobertson/6c4d9f1799cae998454831bcfc21c4d6 to your computer and use it in GitHub Desktop.
A Haskell environment built with a Nix shell.
{ nixpkgs ? import <nixpkgs> {} }:
let
inherit (nixpkgs) pkgs;
inherit (pkgs) haskellPackages;
haskellDeps = ps: with ps; [
base
lens
mtl
];
ghc = haskellPackages.ghcWithPackages haskellDeps;
nixPackages = [
pkgs.wget
ghc
pkgs.gdb
haskellPackages.cabal-install
pkgs.cabal2nix
];
in
pkgs.stdenv.mkDerivation {
name = "env";
buildInputs = nixPackages;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment