on hkm/passthru-run help sign in
haskell.nix/build.nix
67 lines 2.8 kB history raw
1# This file contains the package set used by the release.nix jobset.
2#
3# It is separate from default.nix because that file is the public API
4# of Haskell.nix, which shouldn't have tests, etc.
6{ nixpkgs ? ./nixpkgs
7# Provide args to the nixpkgs instantiation.
8, system ? builtins.currentSystem
9, crossSystem ? null
10, config ? {}
11, nixpkgsArgs ? { inherit system crossSystem; }
12}:
14let
15 haskellNixArgs = import ./default.nix;
16 pkgs = import nixpkgs ({
17 config = haskellNixArgs.config // config;
18 overlays = haskellNixArgs.overlays ++
19 [(self: super: {
20 darcs = (self.haskell-nix.hackage-package {
21 name = "darcs";
22 version = "2.14.2";
23 index-state = "2019-10-28T00:00:00Z";
24 # Apply the latest darcs.net Setup.hs patches
25 modules = [{packages.darcs.patches = [ ./patches/darcs-setup.patch ];}];
26 }).components.exes.darcs;
27 })]; } // nixpkgsArgs);
28 haskell = pkgs.haskell-nix;
30in rec {
31 tests = import ./test/default.nix { inherit nixpkgs nixpkgsArgs; };
33 # 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).
37 maintainer-scripts = pkgs.dontRecurseIntoAttrs {
38 update-hackage = haskell.callPackage ./scripts/update-hackage.nix {};
39 update-stackage = haskell.callPackage ./scripts/update-stackage.nix {};
40 update-pins = haskell.callPackage ./scripts/update-pins.nix {};
41 update-docs = haskell.callPackage ./scripts/update-docs.nix {
42 generatedOptions = import ./scripts/options-doc.nix {
43 # nixpkgs unstable changes "Option has no description" from an
44 # error into a warning. That is quite helpful when hardly any
45 # of our options are documented, thanks @oxij.
46 pkgs = import (pkgs.fetchFromGitHub {
47 owner = "NixOS";
48 repo = "nixpkgs";
49 rev = "4ab1c14714fc97a27655f3a6877386da3cb237bc";
50 sha256 = "16lcj9552q2jfxc27j6116qkf2vl2dcj7vhg5gdq4qi51d891yhn";
51 }) {};
52 };
53 };
54 check-hydra = haskell.callPackage ./scripts/check-hydra.nix {};
55 check-closure-size = haskell.callPackage ./scripts/check-closure-size.nix {};
56 };
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 };