Commit 2cbe081b authored by Ben Gamari's avatar Ben Gamari 🐢

nix: All all packages with patches to testedPackages

parent 76a70ef4
Pipeline #8338 passed with stage
in 22 minutes and 56 seconds
......@@ -59,19 +59,38 @@ let
inputs = lib.concatLists (lib.filter lib.isList (builtins.split re drv));
in map import inputs;
# All Haskell packages built with the HEAD compiler.
haskellPackages = nixpkgs.haskellPackages;
# The packages which we are here to test
testedPackages = with nixpkgs.haskell.lib; with nixpkgs.haskellPackages; {
testedPackages = with nixpkgs.haskell.lib; with haskellPackages; {
inherit lens aeson criterion scotty;
# servant: Don't distribute Sphinx documentation
servant = overrideCabal servant { postInstall = ""; };
# singletons: Disable testsuite since it often breaks due to spurious
# TH-pretty-printing changes
singletons = dontCheck singletons;
};
} // patchedPackages;
# All of the packages which we have patches for.
patchedPackages =
let
toPackageAttr = patchFile: _type:
let
parts = builtins.match "([a-zA-Z0-9-]+)-.*" patchFile;
pkgName = builtins.elemAt parts 0;
in lib.nameValuePair pkgName haskellPackages."${pkgName}";
brokenPackages = [
# vty isn't applied to its terminfo argument for some reason and I
# can't convinced vty.override to apply it.
"vty"
];
in builtins.removeAttrs (lib.mapAttrs' toPackageAttr (builtins.readDir ../patches)) brokenPackages;
inherit (nixpkgs) lib;
transHaskellDeps = drv:
if drv == null then [] else
let
haskellDeps = drv.passthru.getBuildInputs.haskellBuildInputs or [];
in [{
......@@ -83,9 +102,10 @@ let
version = drv.passthru.version;
}] ++ lib.concatMap transHaskellDeps haskellDeps;
# Used by the summarize.py script to get a picture of the packages built during the run.
summary = {
pkgs = lib.concatMap transHaskellDeps (lib.attrValues testedPackages);
roots = map (drv: drv.name) (lib.attrValues testedPackages);
roots = lib.concatMap (drv: if drv == null then [] else [drv.name]) (lib.attrValues testedPackages);
};
# Find Job ID of the given job name in the given pipeline
......@@ -118,8 +138,9 @@ let
'';
in {
inherit nixpkgs ghc testedPackages buildDepends;
inherit (nixpkgs) haskellPackages lib;
inherit testedPackages patchedPackages;
inherit nixpkgs ghc buildDepends;
inherit haskellPackages;
testedPackageNames = nixpkgs.lib.attrNames testedPackages;
inherit summary find-job;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment