mirror of
https://github.com/qfpl/applied-fp-course.git
synced 2024-11-30 02:14:01 +03:00
e701b91a7b
Level 04 contains some testing fun. Removed spurious yaml file from level03. Update README. Have noticed irritating snafu RE the app structure. Not built as a library in other levels, will fix.
14 lines
350 B
Nix
14 lines
350 B
Nix
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
|
|
|
|
let
|
|
inherit (nixpkgs) pkgs;
|
|
|
|
haskellPackages = if compiler == "default"
|
|
then pkgs.haskellPackages
|
|
else pkgs.haskell.packages.${compiler};
|
|
|
|
drv = haskellPackages.callPackage ./default.nix {};
|
|
|
|
in
|
|
if pkgs.lib.inNixShell then drv.env else drv
|