forked from NixOS/cabal2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.nix
44 lines (42 loc) · 1.75 KB
/
release.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
43
44
/* Build instructions for the continuous integration system Hydra. */
{ cabal2nixSrc ? { outPath = ./.; revCount = 0; gitTag = "dirty"; }
, releaseBuild ? false
, supportedPlatforms ? ["x86_64-linux"] ++ (if releaseBuild then ["i686-linux" "x86_64-darwin"] else [])
, supportedCompilers ? ["ghc7101"]
}:
let
genAttrs = (import <nixpkgs> { }).lib.genAttrs;
in
{
cabal2nix = genAttrs supportedCompilers (ghcVer: genAttrs supportedPlatforms (system:
let
pkgs = import <nixpkgs> { inherit system; };
haskellPackages = pkgs.lib.getAttrFromPath ["haskell-ng" "packages" ghcVer] pkgs;
in
haskellPackages.mkDerivation {
pname = "cabal2nix";
version = cabal2nixSrc.gitTag;
src = cabal2nixSrc;
isLibrary = false;
isExecutable = true;
preConfigure = "runhaskell $setupCompileFlags generate-cabal-file.hs >cabal2nix.cabal";
buildTools = with haskellPackages; [ cartel pkgs.git ];
buildDepends = with haskellPackages; [
aeson base bytestring Cabal containers deepseq deepseq-generics
directory filepath hackage-db monad-par monad-par-extras mtl pretty
process QuickCheck regex-posix SHA split transformers
utf8-string lens optparse-applicative
];
testDepends = with haskellPackages; [
aeson base bytestring Cabal containers deepseq deepseq-generics
directory doctest filepath hackage-db hspec monad-par
monad-par-extras mtl pretty process QuickCheck
regex-posix SHA split transformers utf8-string
];
homepage = "http://github.com/NixOS/cabal2nix";
description = "Convert Cabal files into Nix build instructions";
license = pkgs.stdenv.lib.licenses.bsd3;
maintainers = [ pkgs.stdenv.lib.maintainers.simons ];
}
));
}