git.iko.soy/typeable/cabal2nix
on v20150525 help sign in
typeable/cabal2nix/release.nix
44 lines 1.8 kB history raw
1/* Build instructions for the continuous integration system Hydra. */
3{ cabal2nixSrc ? { outPath = ./.; revCount = 0; gitTag = "dirty"; }
4, releaseBuild ? false
5, supportedPlatforms ? ["x86_64-linux"] ++ (if releaseBuild then ["i686-linux" "x86_64-darwin"] else [])
6, supportedCompilers ? ["ghc7101"]
7}:
9let
10 genAttrs = (import <nixpkgs> { }).lib.genAttrs;
11in
13 cabal2nix = genAttrs supportedCompilers (ghcVer: genAttrs supportedPlatforms (system:
14 let
15 pkgs = import <nixpkgs> { inherit system; };
16 haskellPackages = pkgs.lib.getAttrFromPath ["haskell-ng" "packages" ghcVer] pkgs;
17 in
18 haskellPackages.mkDerivation {
19 pname = "cabal2nix";
20 version = cabal2nixSrc.gitTag;
21 src = cabal2nixSrc;
22 isLibrary = false;
23 isExecutable = true;
24 preConfigure = "runhaskell $setupCompileFlags generate-cabal-file.hs >cabal2nix.cabal";
25 buildTools = with haskellPackages; [ cartel pkgs.git ];
26 buildDepends = with haskellPackages; [
27 aeson base bytestring Cabal containers deepseq deepseq-generics
28 directory filepath hackage-db monad-par monad-par-extras mtl pretty
29 process QuickCheck regex-posix SHA split transformers
30 utf8-string lens
31 ];
32 testDepends = with haskellPackages; [
33 aeson base bytestring Cabal containers deepseq deepseq-generics
34 directory doctest filepath hackage-db hspec monad-par
35 monad-par-extras mtl pretty process QuickCheck
36 regex-posix SHA split transformers utf8-string
37 ];
38 homepage = "http://github.com/NixOS/cabal2nix";
39 description = "Convert Cabal files into Nix build instructions";
40 license = pkgs.stdenv.lib.licenses.bsd3;
41 maintainers = [ pkgs.stdenv.lib.maintainers.simons ];
42 }
43 ));