Skip to content

Commit 42e0ad6

Browse files
committed
Added nix expression for Hydra
1 parent 199c96f commit 42e0ad6

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

release.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
let
2+
inherit (builtins) listToAttrs;
3+
inherit (pkgs.lib) nameValuePair;
4+
pkgs = import <nixpkgs> {};
5+
extraPkgs = import <haskellPackages>;
6+
combos = [
7+
{ ghcV = "704"; aesonV = "0_6_0_0"; }
8+
{ ghcV = "742"; aesonV = "0_7_0_4"; }
9+
{ ghcV = "763"; aesonV = "0_7_0_4"; }
10+
{ ghcV = "783"; aesonV = "0_8_0_2"; }
11+
# { ghcV = "HEAD"; aesonV = "0_8_0_2"; }
12+
];
13+
toLabel = { ghcV, aesonV }: "ghc${ghcV}-aeson_${aesonV}";
14+
build = { ghcV, aesonV }:
15+
let
16+
hp = pkgs.lib.getAttrFromPath ["haskellPackages_ghc${ghcV}"] pkgs;
17+
aeson = hp.callPackage (pkgs.lib.getAttrFromPath ["aeson_${aesonV}"] extraPkgs) {};
18+
inherit (hp) cabal HUnit mtl testFramework testFrameworkHunit text unorderedContainers vector;
19+
in cabal.mkDerivation (self: {
20+
pname = "json-rpc-server";
21+
version = "0.1.3.0";
22+
isLibrary = true;
23+
src = <jsonRpcServerSrc>;
24+
buildDepends = [ aeson mtl text unorderedContainers vector ];
25+
testDepends = [
26+
aeson HUnit mtl testFramework testFrameworkHunit text
27+
unorderedContainers vector
28+
];
29+
meta = {
30+
description = "JSON RPC 2.0 on the server side.";
31+
license = self.stdenv.lib.licenses.mit;
32+
platforms = self.ghc.meta.platforms;
33+
};
34+
});
35+
in {
36+
jsonRpcServer = let pair = versions : nameValuePair (toLabel versions) (build versions);
37+
in listToAttrs (map pair combos);
38+
}

0 commit comments

Comments
 (0)