add matebeamter

This commit is contained in:
Astro 2019-11-15 19:15:49 +01:00
parent dd8aec4637
commit 8af84999dd
2 changed files with 40 additions and 0 deletions

View File

@ -53,6 +53,15 @@ let
};
};
matebeamter = mkJobset {
description = "Mateamt frontend by nek0";
nixexprpath = "matebeamter.nix";
gitUrls = {
mateamt = "https://github.com/nek0/mateamt.git master 1";
matebeamter = "https://github.com/nek0/matebeamter.git master 1";
};
};
tigger = mkJobset {
description = "XMPP MUC bot";
nixexprpath = "tigger.nix";

31
matebeamter.nix Normal file
View File

@ -0,0 +1,31 @@
{ pkgs ? import <nixpkgs> { config.allowBroken = true; },
}:
with pkgs;
let
source = stdenv.mkDerivation {
name = "matebeamter-source";
src = <matebeamter>;
buildInputs = [ cabal2nix ];
buildPhase = ''
cabal2nix . > package.nix
'';
installPhase = "cp -ar . $out";
};
ghcVersions =
builtins.filter (p:
p == "ghcHEAD" || builtins.match "ghc[[:digit:]]+" p != null
) (builtins.attrNames pkgs.haskell.packages);
matebeamter = haskellPackages: with haskellPackages;
let
mateamt = callPackage <mateamt/shell.nix> {
nixpkgs = pkgs // { inherit haskellPackages; };
};
in
callPackage "${source}/package.nix" { inherit mateamt; };
in
builtins.listToAttrs
(map (ghcVersion: {
name = "matebeamter-${ghcVersion}";
value = pkgs.lib.hydraJob (matebeamter (builtins.getAttr ghcVersion haskell.packages));
}) ghcVersions)