forked from system-f/fp-course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
36 lines (30 loc) · 1.09 KB
/
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
27
28
29
30
31
32
33
34
35
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
sources = {
tasty = pkgs.fetchFromGitHub {
owner = "feuerbach";
repo = "tasty";
rev = "core-1.1.0.1";
sha256 = "03fcc75l5mrn5dwh6xix5ggn0qkp8kj7gzamb6n2m42ir6j7x60l";
};
};
modifiedHaskellPackages = haskellPackages.override {
overrides = self: super: {
tasty = super.callCabal2nix "tasty" "${sources.tasty}/core" {};
tasty-hunit = super.callCabal2nix "tasty" "${sources.tasty}/hunit" {};
tasty-quickcheck = super.callCabal2nix "tasty" "${sources.tasty}/quickcheck" {};
};
};
fp-course = modifiedHaskellPackages.callPackage ./fp-course.nix {};
modified-fp-course = pkgs.haskell.lib.overrideCabal fp-course (drv: {
# Dodgy fun times, make sure that
# - the tests compile
# - the tests failing doesn't cause the build to fail
checkPhase = "true";
});
in
modified-fp-course