]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - flakes/private/buildbot/flake.nix
Flake webapps
[perso/Immae/Config/Nix.git] / flakes / private / buildbot / flake.nix
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 = ../../../modules/private/buildbot/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 = ../../../modules/private/buildbot/projects + "/${project.name}";
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.libvirt pkgs.treq pkgs.ldap3 buildbot-full
49 pkgs.buildbot-worker pkgs.pip buildbot_common wokkel
50 ];
51 };
52 buildslist-plugin = pkgs.callPackage ./buildslist {
53 pythonPackages = python.pkgs;
54 buildslist_src = buildslist;
55 };
56 in rec {
57 packages = {
58 buildslist = buildslist-plugin;
59 buildbot-full = buildbot-full;
60 buildbot_common = buildbot_common;
61 };
62 defaultPackage = packages.buildbot-full;
63 legacyPackages = packages;
64 checks = packages;
65 }) // rec {
66 overlays = {
67 immae-buildbot = final: prev: {
68 immae-buildbot = self.defaultPackage."${final.system}";
69 };
70 };
71 overlay = overlays.immae-buildbot;
72 };
73 }