summaryrefslogtreecommitdiff
path: root/chaski/services/VaaS/default.nix
blob: 427270c03aa5a73eb46ed1dfbe5d9edbe95dd390 (plain)
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
{ pkgs, compiler ? "default", doBenchmark ? false }:

let

  inherit pkgs;

  f = { mkDerivation, base, base32, bytestring, http-client
      , http-client-tls, http-types, lib, process, wai, warp
      }:
      mkDerivation {
        pname = "VaaS";
        version = "0.1.0.0";
        src = ./.;
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
          base base32 bytestring http-client http-client-tls http-types
          process wai warp
        ];
        license = "unknown";
        hydraPlatforms = lib.platforms.none;
      };

  haskellPackages = if compiler == "default"
                       then pkgs.haskellPackages
                       else pkgs.haskell.packages.${compiler};

  variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
in
  variant (haskellPackages.callPackage f {})