about summary refs log tree commit diff
path: root/overlays/patches/emacs/overlay/hydra/default.nix
blob: 97d015f8ed4dd5050882dd06b9f258c3f8c54ad9 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{ nixpkgs, declInput }:
let
  pkgs = import nixpkgs {};

  mkJobset = {
    nixpkgsRelease
    , nixFile
    , descriptionNote
  }: {
    enabled = 1;
    hidden = false;
    description = "Emacs-overlay jobset for nixpkgs branch ${nixpkgsRelease} (${descriptionNote})";
    nixexprinput = "src";
    nixexprpath = "hydra/${nixFile}";
    checkinterval = 1800;
    schedulingshares = 100;
    enableemail = false;
    emailoverride = "";
    keepnr = 3;
    type = 0;  # Non-flake (legacy)
    inputs = {
      src = {
        type = "git";
        value = "https://github.com/nix-community/emacs-overlay.git";
        emailresponsible = false;
      };
      nixpkgs = {
        type = "git";
        value = "https://github.com/NixOS/nixpkgs.git ${nixpkgsRelease}";
        emailresponsible = false;
      };
    };
  };

  jobsets = {

    unstable = mkJobset {
      nixpkgsRelease = "nixos-unstable";
      nixFile = "emacsen.nix";
      descriptionNote = "emacs";
    };

    stable = mkJobset {
      nixpkgsRelease = "nixos-22.05";
      nixFile = "emacsen.nix";
      descriptionNote = "emacs";
    };

    unstable-cross = mkJobset {
      nixpkgsRelease = "nixos-unstable";
      nixFile = "emacsen-cross.nix";
      descriptionNote = "emacs cross builds";
    };

    stable-cross = mkJobset {
      nixpkgsRelease = "nixos-22.05";
      nixFile = "emacsen-cross.nix";
      descriptionNote = "emacs cross builds";
    };

    unstable-pkgs = mkJobset {
      nixpkgsRelease = "nixos-unstable";
      nixFile = "packages.nix";
      descriptionNote = "emacs packages";
    };

    unstable-rc-pkgs = mkJobset {
      nixpkgsRelease = "nixos-unstable";
      nixFile = "packages-unstable.nix";
      descriptionNote = "emacs packages (pre-release)";
    };

    unstable-git-pkgs = mkJobset {
      nixpkgsRelease = "nixos-unstable";
      nixFile = "packages-git.nix";
      descriptionNote = "emacs packages (git)";
    };

    unstable-gcc-pkgs = mkJobset {
      nixpkgsRelease = "nixos-unstable";
      nixFile = "packages-gcc.nix";
      descriptionNote = "emacs packages (native-comp)";
    };

  };

in {
  jobsets = pkgs.runCommand "spec.json" {} ''
    cat <<EOF
    ${builtins.toXML declInput}
    EOF
    cat > spec.json <<EOF
    ${builtins.toJSON jobsets}
    EOF

    cat spec.json | ${pkgs.jq}/bin/jq -r . > $out

  '';
}