summary refs log tree commit diff
path: root/pkgs/top-level/guile-2-test.nix
blob: 802277d474a102af2950935f0e9c764097363e58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* A Hydra jobset to test Guile-using applications and libraries with the
   Guile 2.x pre-releases.

   -- ludo@gnu.org  */

let
  allPackages = import ./all-packages.nix;

  pkgsFun = { system ? builtins.currentSystem }:
    allPackages {
      inherit system;
      config.packageOverrides = pkgs: {
        guile = pkgs.guile_2_0;
      };
    };

  pkgs = pkgsFun {};

  toJob = x: if builtins.isAttrs x then x else
    { type = "job"; systems = x; schedulingPriority = 10; };

  /* Perform a job on the given set of platforms.  The function `f' is
     called by Hydra for each platform, and should return some job
     to build on that platform.  `f' is passed the Nixpkgs collection
     for the platform in question. */
  testOn = systems: f: {system ? builtins.currentSystem}:
    if pkgs.lib.elem system systems
    then f (pkgsFun {inherit system;})
    else {};

  /* Map an attribute of the form `foo = [platforms...]'  to `testOn
     [platforms...] (pkgs: pkgs.foo)'. */
  mapTestOn = pkgs.lib.mapAttrsRecursiveCond
    (as: !(as ? type && as.type == "job"))
    (path: value:
      let
        job = toJob value;
        getPkg = pkgs:
          pkgs.lib.addMetaAttrs { schedulingPriority = toString job.schedulingPriority; }
          (pkgs.lib.getAttrFromPath path pkgs);
      in testOn job.systems getPkg);

  inherit (pkgs.lib.platforms) linux darwin cygwin allBut all;

in (mapTestOn {
  /* The package list below was obtained with:

     cat top-level/all-packages.nix                             \
     | grep -B3 'guile[^=]*$'                                   \
     | grep '^[[:blank:]]*[a-zA-Z0-9_]\+[[:blank:]]*='          \
     | sed -es'/^[[:blank:]]*\(.\+\)[[:blank:]]*=.*$/\1= linux;/g'

     with some minor edits.
   */

  guile = linux;

  autogen = linux;
  lsh = linux;
  mailutils = linux;
  mcron = linux;
  texmacs = linux;
  guileCairo = linux;
  guileGnome = linux;
  guile_lib = linux;
  guileLint = linux;
  guile_ncurses = linux;
  gwrap = linux;
  swig = linux;
  gnutls = linux;
  slibGuile = linux;
  dico = linux;
  trackballs = linux;
  beast = linux;
  elinks = linux;
  gnucash = linux;
  gnunet = linux;
  snd = linux;
  ballAndPaddle = linux;
  drgeo = linux;
  lilypond = linux;
  liquidwar = linux;
  freetalk = linux;
})