-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathjobset-jailbreak-cabal.nix
42 lines (34 loc) · 1.22 KB
/
jobset-jailbreak-cabal.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
36
37
38
39
40
41
42
# jailbreak-cabal-ci.nix
{ jailbreakCabalSrc ? { outPath = ../jailbreak-cabal; revCount = 0; gitTag = "dirty"; }
, supportedSystems ? ["x86_64-linux"]
, supportedCompilers ? ["ghc784" "ghc7103" "ghc801"]
}:
with (import <nixpkgs/pkgs/top-level/release-lib.nix> { inherit supportedSystems; });
let
lib = pkgs.lib // pkgs.haskell.lib;
buildFun = { mkDerivation, base, Cabal }: mkDerivation {
pname = "jailbreak-cabal";
version = jailbreakCabalSrc.gitTag;
src = jailbreakCabalSrc;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [ base Cabal ];
homepage = "http://github.com/peti/jailbreak-cabal";
description = "Strip version restrictions from build dependencies in Cabal files";
license = pkgs.stdenv.lib.licenses.bsd3;
};
in
{
jailbreak-cabal = lib.genAttrs supportedCompilers (compiler:
lib.genAttrs supportedSystems (system:
let
pkgs = pkgsFor system;
haskellPackages = pkgs.haskell.packages.${compiler};
Cabal = if compiler == "ghc801"
then null
else haskellPackages.Cabal_1_20_0_3;
in
haskellPackages.callPackage buildFun { inherit Cabal; }
)
);
}