mirror of
https://github.com/qfpl/applied-fp-course.git
synced 2024-11-26 14:43:53 +03:00
418ce19e02
- Regenerated the individual nix files. - Removed the shell.nix files Just running ``$ nix-build`` in levels greater than 2 currently doesn't succeed, still working on this. The nix-shell environments work as expected for all levels.
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 ./level02.nix {};
|
|
|
|
in
|
|
if pkgs.lib.inNixShell then drv.env else drv
|