mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-08-17 13:51:21 +03:00
Add hydra.json and jobsets.nix for hydra
This commit is contained in:
parent
1459a80086
commit
5013b592f1
@ -36,9 +36,10 @@ let
|
||||
then pkgs.lib.composeExtensions orig.overrides overlay
|
||||
else overlay;
|
||||
};
|
||||
|
||||
|
||||
in {
|
||||
haskellPackages =
|
||||
pkgs.haskell.packages.${compiler}.override overrideHaskellPackages;
|
||||
inherit pkgs;
|
||||
nixpkgs = pkgs;
|
||||
}
|
||||
|
29
hydra.json
Normal file
29
hydra.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"enabled": 1,
|
||||
"hidden": true,
|
||||
"description": "Jobsets",
|
||||
"nixexprinput": "src",
|
||||
"nixexprpath": "jobsets.nix",
|
||||
"checkinterval": 300,
|
||||
"schedulingshares": 100,
|
||||
"enableemail": false,
|
||||
"emailoverride": "",
|
||||
"keepnr": 10,
|
||||
"inputs": {
|
||||
"src": {
|
||||
"type": "git",
|
||||
"value": "https://github.com/haskell-nix/hnix-store.git master 1",
|
||||
"emailresponsible": false
|
||||
},
|
||||
"nixpkgs": {
|
||||
"type": "git",
|
||||
"value": "https://github.com/NixOS/nixpkgs-channels nixos-unstable",
|
||||
"emailresponsible": false
|
||||
},
|
||||
"prs": {
|
||||
"type": "githubpulls",
|
||||
"value": "haskell-nix hnix-store",
|
||||
"emailresponsible": false
|
||||
}
|
||||
}
|
||||
}
|
66
jobsets.nix
Normal file
66
jobsets.nix
Normal file
@ -0,0 +1,66 @@
|
||||
{ prs }:
|
||||
|
||||
let
|
||||
self = import ./. {};
|
||||
pkgs = self.nixpkgs;
|
||||
mkFetchGithub = value: {
|
||||
inherit value;
|
||||
type = "git";
|
||||
emailresponsible = false;
|
||||
};
|
||||
in
|
||||
with pkgs.lib;
|
||||
let
|
||||
defaults = jobs: {
|
||||
inherit (jobs) description;
|
||||
enabled = 1;
|
||||
hidden = false;
|
||||
keepnr = 10;
|
||||
schedulingshares = 100;
|
||||
checkinterval = 120;
|
||||
enableemail = false;
|
||||
emailoverride = "";
|
||||
nixexprinput = "hnix-store";
|
||||
nixexprpath = "release.nix";
|
||||
inputs = jobs.inputs // {
|
||||
nixpkgs = {
|
||||
type = "git";
|
||||
value = "https://github.com/NixOS/nixpkgs-channels nixos-unstable";
|
||||
emailresponsible = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
branchJobset = branch: defaults {
|
||||
description = "hnix-store-${branch}";
|
||||
inputs = {
|
||||
hnix-store = {
|
||||
value = "https://github.com/haskell-nix/hnix-store ${branch}";
|
||||
type = "git";
|
||||
emailresponsible = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
makePr = num: info: {
|
||||
name = "hnix-store-pr-${num}";
|
||||
value = defaults {
|
||||
description = "#${num}: ${info.title}";
|
||||
inputs = {
|
||||
hnix-store = {
|
||||
#NOTE: This should really use "pull/${num}/merge"; however, GitHub's
|
||||
#status checks only operate on PR heads. This creates a race
|
||||
#condition, which can currently only be solved by requiring PRs to be
|
||||
#up to date before they're merged. See
|
||||
#https://github.com/isaacs/github/issues/1002
|
||||
value = "https://github.com/haskell-nix/hnix-store pull/${num}/head 1";
|
||||
type = "git";
|
||||
emailresponsible = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
processedPrs = mapAttrs' makePr (builtins.fromJSON (builtins.readFile prs));
|
||||
jobsetsAttrs = processedPrs //
|
||||
genAttrs ["master" "pending"] branchJobset;
|
||||
in {
|
||||
jobsets = pkgs.writeText "spec.json" (builtins.toJSON jobsetsAttrs);
|
||||
}
|
Loading…
Reference in New Issue
Block a user