mirror of
https://github.com/qfpl/applied-fp-course.git
synced 2024-11-27 01:23:00 +03:00
3f3ac5b108
Not sure I like it very much, the work continues.
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
|