default.nix 3.34 KB
Newer Older
1
2
3
4
{ nixpkgs ? import <nixpkgs> {}
}:
with nixpkgs;
let
Christopher League's avatar
Christopher League committed
5
6
7
  # This requires the nixpkgs-stackage overlay.
  hpkgs = nixpkgs.pkgs.haskell.packages.stackage.lts-1110;
  hlib = nixpkgs.pkgs.haskell.lib;
8

Christopher League's avatar
Christopher League committed
9
10
11
12
  # The gogol package is not part of stackage LTS, and it's a bit
  # tricky to build. Best results so far are with LTS specified above
  # and the gogol revision specified here.
  gogol-src = pkgs.fetchgit {
13
14
15
16
17
    url = "https://github.com/brendanhay/gogol.git";
    rev = "344c9f781560e1ed8395b17e370ba1b085f2edc2";
    sha256 = "0f48mh7f2ifk3b7rjwgn9cwmi6845xv9zvs07khycbk70959pk1n";
  };

Christopher League's avatar
Christopher League committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  gogol-core =
    { mkDerivation, aeson, attoparsec, base, bifunctors, bytestring
    , case-insensitive, conduit, dlist, exceptions, hashable
    , http-api-data, http-client, http-media, http-types, lens
    , resourcet, scientific, servant, stdenv, tasty, text, time
    , unordered-containers
    }:
    mkDerivation {
      pname = "gogol-core";
      version = "0.3.0";
      src = gogol-src;
      preCompileBuildDriver = "cd core";
      libraryHaskellDepends = [
        aeson attoparsec base bifunctors bytestring case-insensitive
        conduit dlist exceptions hashable http-api-data http-client
        http-media http-types lens resourcet scientific servant text time
        unordered-containers
      ];
      testHaskellDepends = [ base tasty ];
      homepage = "https://github.com/brendanhay/gogol";
      description = "Core data types and functionality for Gogol libraries";
      license = "unknown";
    };
41

Christopher League's avatar
Christopher League committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  gogol =
    { mkDerivation, aeson, base, bytestring, case-insensitive, conduit
    , conduit-extra, cryptonite, directory, exceptions, filepath
    , gogol-core, http-client, http-conduit, http-media, http-types
    , lens, memory, mime-types, mtl, resourcet, stdenv, text, time
    , transformers, unliftio-core, unordered-containers, x509
    , x509-store
    }:
    mkDerivation {
      pname = "gogol";
      version = "0.3.0";
      src = gogol-src;
      preCompileBuildDriver = "cd gogol";
      libraryHaskellDepends = [
        aeson base bytestring case-insensitive conduit conduit-extra
        cryptonite directory exceptions filepath gogol-core http-client
        http-conduit http-media http-types lens memory mime-types mtl
        resourcet text time transformers unliftio-core unordered-containers
        x509 x509-store
      ];
      homepage = "https://github.com/brendanhay/gogol";
      description = "Comprehensive Google Services SDK";
      license = "unknown";
    };
66

Christopher League's avatar
Christopher League committed
67
68
69
70
71
72
73
74
75
76
77
78
  gogol-cal =
    { mkDerivation, base, gogol-core, stdenv }:
    mkDerivation {
      pname = "gogol-apps-calendar";
      version = "0.3.0";
      src = gogol-src;
      preCompileBuildDriver = "cd gogol-apps-calendar";
      libraryHaskellDepends = [ base gogol-core ];
      homepage = "https://github.com/brendanhay/gogol";
      description = "Google Calendar SDK";
      license = "unknown";
    };
79

Christopher League's avatar
Christopher League committed
80
  hpkgs' = hpkgs.override {
81
    overrides = self: super: {
Christopher League's avatar
Christopher League committed
82
83
84
85
86
      alex = hlib.dontCheck super.alex;
      bookme = self.callPackage (import ./bookme.nix) {};
      gogol-core = self.callPackage gogol-core {};
      gogol = self.callPackage gogol {};
      gogol-apps-calendar = self.callPackage gogol-cal {};
87
88
89
90
91
92

      mkDerivation = args: super.mkDerivation (args // {
        enableLibraryProfiling = false;
        doHoogle = false;
        doHaddock = false;
      });
93
94
95
    };
  };
in
96
hpkgs'.bookme