mateamt: simplify by 1000%

This commit is contained in:
Astro 2019-12-17 18:22:50 +01:00
parent a05c15a3b6
commit e61e947a2f
1 changed files with 6 additions and 37 deletions

View File

@ -1,38 +1,7 @@
{ pkgs ? import <nixpkgs> {}
{ pkgs ? import <nixpkgs> (import <haskell-nix>)
}:
with pkgs;
let
mateamtSrc = stdenv.mkDerivation {
name = "mateamt-src";
src = <mateamt>;
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
patchPhase = ''
substituteInPlace default.nix \
--replace \
"builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz" \
"<haskell-nix>"
'';
installPhase = "cp -ar . $out";
};
mateamt = haskellPackages.callPackage "${mateamtSrc}";
ghcBlacklist = [
# "ghc822"
# "ghc844"
# "ghc881"
# "ghcHEAD"
];
ghcVersions =
builtins.filter (p:
(p == "ghcHEAD" || builtins.match "ghc[[:digit:]]+" p != null) &&
(!builtins.elem p ghcBlacklist)
) (builtins.attrNames haskell.packages);
in
builtins.listToAttrs
(map (ghcVersion: {
name = "mateamt-${ghcVersion}";
value = lib.hydraJob (mateamt {
compiler = ghcVersion;
nixpkgs = pkgs;
});
}) ghcVersions)
{
mateamt = pkgs.lib.hydraJob (import <mateamt> {
inherit pkgs;
});
}