Add a nix-shell expression

This commit is contained in:
Thomas Tuegel 2017-01-29 17:24:45 -06:00
parent 4d176b52e7
commit 687be80dff
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
1 changed files with 15 additions and 0 deletions

15
shell.nix Normal file
View File

@ -0,0 +1,15 @@
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
drv = haskellPackages.callPackage ./. {};
in
if pkgs.lib.inNixShell then drv.env else drv