forked from system-f/fp-course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
27 lines (22 loc) · 880 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
modifiedHaskellPackages = haskellPackages.override {
overrides = self: super: {
# work-around for some older versions of nixpkgs
tasty-discover =
if super ? tasty-discover_3_0_2
then pkgs.haskell.lib.dontCheck super.tasty-discover_3_0_2
else super.tasty-discover;
};
};
fp-course = modifiedHaskellPackages.callPackage ./fp-course.nix {};
# Dodgy fun times, make sure that
# - the tests compile
# - the tests failing doesn't cause the build to fail
modified-fp-course = pkgs.haskell.lib.overrideCabal fp-course (drv: { checkPhase = "true"; });
in
modified-fp-course