aboutsummaryrefslogtreecommitdiff
path: root/flakes/private/buildbot/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flakes/private/buildbot/flake.nix')
-rw-r--r--flakes/private/buildbot/flake.nix74
1 files changed, 74 insertions, 0 deletions
diff --git a/flakes/private/buildbot/flake.nix b/flakes/private/buildbot/flake.nix
new file mode 100644
index 0000000..8b3c704
--- /dev/null
+++ b/flakes/private/buildbot/flake.nix
@@ -0,0 +1,74 @@
1{
2 description = "The continuous integration framework";
3 inputs.flake-utils.url = "github:numtide/flake-utils";
4 inputs.nixpkgs = {
5 url = "github:NixOS/nixpkgs/840c782d507d60aaa49aa9e3f6d0b0e780912742";
6 flake = false;
7 };
8 inputs.buildslist = {
9 url = "https://git.immae.eu/perso/Immae/Projets/Buildbot/buildslist";
10 type = "git";
11 flake = false;
12 };
13 outputs = { self, nixpkgs, flake-utils, buildslist }: flake-utils.lib.eachSystem ["x86_64-linux"] (system:
14 let
15 pkgs = import nixpkgs { inherit system; overlays = []; };
16 python = pkgs.python38;
17 wokkel = python.pkgs.buildPythonPackage rec {
18 pname = "wokkel";
19 version = "18.0.0";
20 src = python.pkgs.fetchPypi {
21 inherit pname version;
22 sha256 = "1spq44gg8gsviqx1dvlmjpgfc0wk0jpyx4ap01y2pad1ai9cw016";
23 };
24 propagatedBuildInputs = with python.pkgs; [ twisted.extras.tls twisted incremental dateutil ];
25 doCheck = false;
26 };
27 buildbot_common = python.pkgs.buildPythonPackage {
28 name = "buildbot_common";
29 src = ./common;
30 format = "other";
31 installPhase = ''
32 mkdir -p $out/${python.sitePackages}
33 cp -a $src $out/${python.sitePackages}/buildbot_common
34 '';
35 };
36 buildbot-full = python.pkgs.buildbot-full.withPlugins [ buildslist-plugin ] // {
37 inherit buildbot_common;
38 buildbot_config = project: python.pkgs.buildPythonPackage (rec {
39 name = "buildbot_config-${project.name}";
40 src = if project.name == "test" then ./test_project else project.src;
41 format = "other";
42 installPhase = ''
43 mkdir -p $out/${python.sitePackages}
44 cp -a $src $out/${python.sitePackages}/buildbot_config
45 '';
46 });
47 common_packages = pkgs: [
48 (pkgs.apprise.overridePythonAttrs(old: { propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.sleekxmpp ]; })) pkgs.libvirt pkgs.treq pkgs.ldap3
49 buildbot-full pkgs.buildbot-worker pkgs.pip buildbot_common
50 wokkel
51 ];
52 };
53 buildslist-plugin = pkgs.callPackage ./buildslist {
54 pythonPackages = python.pkgs;
55 buildslist_src = buildslist;
56 };
57 in rec {
58 packages = {
59 buildslist = buildslist-plugin;
60 buildbot-full = buildbot-full;
61 buildbot_common = buildbot_common;
62 };
63 defaultPackage = packages.buildbot-full;
64 legacyPackages = packages;
65 checks = packages;
66 }) // rec {
67 overlays = {
68 immae-buildbot = final: prev: {
69 immae-buildbot = self.defaultPackage."${final.system}";
70 };
71 };
72 overlay = overlays.immae-buildbot;
73 };
74}