@@ -20,17 +20,20 @@ let
2020 darcs = (self.haskell-nix.hackage-package {
2121 name = "darcs";
2222 version = "2.14.2";
23+ index-state = "2019-10-28T00:00:00Z";
2324 # Apply the latest darcs.net Setup.hs patches
2425 modules = [{packages.darcs.patches = [ ./patches/darcs-setup.patch ];}];
2526 }).components.exes.darcs;
2627 })]; } // nixpkgsArgs);
2728 haskell = pkgs.haskell-nix;
2829
29−in {
30− inherit (haskell) haskellNixRoots;
30+in rec {
3131 tests = import ./test/default.nix { inherit nixpkgs nixpkgsArgs; };
3232
3333 # Scripts for keeping Hackage and Stackage up to date, and CI tasks.
34+ # The dontRecurseIntoAttrs prevents these from building on hydra
35+ # as not all of them can work in restricted eval mode (as they
36+ # are not pure).
3437 maintainer-scripts = pkgs.dontRecurseIntoAttrs {
3538 update-hackage = haskell.callPackage ./scripts/update-hackage.nix {};
3639 update-stackage = haskell.callPackage ./scripts/update-stackage.nix {};
@@ -51,4 +54,14 @@ in {
5154 check-hydra = haskell.callPackage ./scripts/check-hydra.nix {};
5255 check-closure-size = haskell.callPackage ./scripts/check-closure-size.nix {};
5356 };
57+
58+ # These are pure parts of maintainer-script so they can be built by hydra
59+ # and added to the cache to speed up buildkite.
60+ maintainer-script-cache = pkgs.recurseIntoAttrs {
61+ inherit (maintainer-scripts) update-docs check-hydra check-closure-size;
62+ # Some of the dependencies of the impure scripts so that they will
63+ # will be in the cache too for buildkite.
64+ inherit (pkgs) coreutils glibc git openssh cabal-install nix-prefetch-git;
65+ inherit (haskell) nix-tools;
66+ };
5467}