Skip to content

Instantly share code, notes, and snippets.

@LucianU
Created July 16, 2019 09:48
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 LucianU/7460a5df52f4ea3edd31b80fdfca5ed0 to your computer and use it in GitHub Desktop.
Save LucianU/7460a5df52f4ea3edd31b80fdfca5ed0 to your computer and use it in GitHub Desktop.
Example shell.nix for working with Yesod
let
compiler = "ghc843";
config = import ./pkgconfig.nix { inherit compiler; };
pkgs = import (import ./nixpkgs.nix) { inherit config; };
hpkgs = pkgs.haskell.packages.${compiler};
pkg = hpkgs.callPackage (import ./riskbook.nix) {};
in
{}: pkgs.lib.overrideDerivation pkg.env (old: {
buildInputs = old.buildInputs ++ [
hpkgs.hlint
hpkgs.apply-refact
pkgs.postgresql
];
shellHook = ''
export PGDATA=~/tmp/pgdata;
'';
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment