git.iko.soy/typeable/cabal2nix
on v1.67 help sign in
typeable/cabal2nix/release.nix
33 lines 1.3 kB history raw
1/* Build instructions for the continuous integration system Hydra. */
3{ cabal2nixSrc ? { outPath = ./.; revCount = 0; gitTag = "dirty"; }
4, supportedPlatforms ? [ "x86_64-linux" ]
5, supportedCompilers ? ["ghc6104" "ghc6123" "ghc704" "ghc722" "ghc742" "ghc763" "ghc783" "ghcHEAD"]
6}:
8let
9 genAttrs = (import <nixpkgs> { }).lib.genAttrs;
10in
12 cabal2nix = genAttrs supportedCompilers (ghcVer: genAttrs supportedPlatforms (system:
13 let
14 pkgs = import <nixpkgs> { inherit system; };
15 haskellPackages = pkgs.lib.getAttrFromPath ["haskellPackages_${ghcVer}"] pkgs;
16 in
17 haskellPackages.cabal.mkDerivation (self: {
18 pname = "cabal2nix";
19 src = cabal2nixSrc;
20 version = cabal2nixSrc.gitTag;
21 isLibrary = false;
22 isExecutable = true;
23 buildDepends = with haskellPackages; [ Cabal filepath hackageDb HTTP mtl regexPosix ];
24 testDepends = with haskellPackages; [ doctest ];
25 doCheck = self.stdenv.lib.versionOlder "7.6" self.ghc.version;
26 meta = {
27 homepage = "http://github.com/NixOS/cabal2nix";
28 description = "Convert Cabal files into Nix build instructions";
29 license = self.stdenv.lib.licenses.bsd3;
30 maintainers = [ self.stdenv.lib.maintainers.simons ];
31 };
32 })));