buildbot: add Python 3 support

This commit is contained in:
Ben Wolsieffer 2017-12-16 23:06:43 -05:00
parent 71c42462ab
commit 73c523a605
13 changed files with 331 additions and 229 deletions

View File

@ -113,6 +113,15 @@
(i.e. <literal>users.users.yourusername.extraGroups = ["video"];</literal>). (i.e. <literal>users.users.yourusername.extraGroups = ["video"];</literal>).
</para> </para>
</listitem> </listitem>
<listitem>
<para>
Buildbot now supports Python 3 and its packages have been moved to
<literal>pythonPackages</literal>. The options
<option>services.buildbot-master.package</option> and
<option>services.buildbot-worker.package</option> can be used to select
the Python 2 or 3 version of the package.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -6,8 +6,12 @@ with lib;
let let
cfg = config.services.buildbot-master; cfg = config.services.buildbot-master;
python = cfg.package.pythonModule;
escapeStr = s: escape ["'"] s; escapeStr = s: escape ["'"] s;
masterCfg = if cfg.masterCfg == null then pkgs.writeText "master.cfg" ''
defaultMasterCfg = pkgs.writeText "master.cfg" ''
from buildbot.plugins import * from buildbot.plugins import *
factory = util.BuildFactory() factory = util.BuildFactory()
c = BuildmasterConfig = dict( c = BuildmasterConfig = dict(
@ -27,8 +31,28 @@ let
factory.addStep(step) factory.addStep(step)
${cfg.extraConfig} ${cfg.extraConfig}
'' '';
else cfg.masterCfg;
tacFile = pkgs.writeText "buildbot-master.tac" ''
import os
from twisted.application import service
from buildbot.master import BuildMaster
basedir = '${cfg.buildbotDir}'
configfile = '${cfg.masterCfg}'
# Default umask for server
umask = None
# note: this line is matched against to check that this is a buildmaster
# directory; do not edit it.
application = service.Application('buildmaster')
m = BuildMaster(basedir, configfile, umask)
m.setServiceParent(application)
'';
in { in {
options = { options = {
@ -66,9 +90,9 @@ in {
}; };
masterCfg = mkOption { masterCfg = mkOption {
type = types.nullOr types.path; type = types.path;
description = "Optionally pass master.cfg path. Other options in this configuration will be ignored."; description = "Optionally pass master.cfg path. Other options in this configuration will be ignored.";
default = null; default = defaultMasterCfg;
example = "/etc/nixos/buildbot/master.cfg"; example = "/etc/nixos/buildbot/master.cfg";
}; };
@ -175,18 +199,25 @@ in {
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pkgs.buildbot-full; default = pkgs.pythonPackages.buildbot-full;
defaultText = "pkgs.buildbot-full"; defaultText = "pkgs.pythonPackages.buildbot-full";
description = "Package to use for buildbot."; description = "Package to use for buildbot.";
example = literalExample "pkgs.buildbot-full"; example = literalExample "pkgs.python3Packages.buildbot-full";
}; };
packages = mkOption { packages = mkOption {
default = with pkgs; [ python27Packages.twisted git ]; default = [ pkgs.git ];
example = literalExample "[ pkgs.git ]"; example = literalExample "[ pkgs.git ]";
type = types.listOf types.package; type = types.listOf types.package;
description = "Packages to add to PATH for the buildbot process."; description = "Packages to add to PATH for the buildbot process.";
}; };
pythonPackages = mkOption {
default = pythonPackages: with pythonPackages; [ ];
defaultText = "pythonPackages: with pythonPackages; [ ]";
description = "Packages to add the to the PYTHONPATH of the buildbot process.";
example = literalExample "pythonPackages: with pythonPackages; [ requests ]";
};
}; };
}; };
@ -210,14 +241,15 @@ in {
description = "Buildbot Continuous Integration Server."; description = "Buildbot Continuous Integration Server.";
after = [ "network-online.target" ]; after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = cfg.packages; path = cfg.packages ++ cfg.pythonPackages python.pkgs;
environment.PYTHONPATH = "${python.withPackages (self: cfg.pythonPackages self ++ [ cfg.package ])}/${python.sitePackages}";
preStart = '' preStart = ''
env > envvars mkdir -vp "${cfg.buildbotDir}"
mkdir -vp ${cfg.buildbotDir} # Link the tac file so buildbot command line tools recognize the directory
ln -sfv ${masterCfg} ${cfg.buildbotDir}/master.cfg ln -sf "${tacFile}" "${cfg.buildbotDir}/buildbot.tac"
rm -fv $cfg.buildbotDir}/buildbot.tac ${cfg.package}/bin/buildbot create-master --db "${cfg.dbUrl}" "${cfg.buildbotDir}"
${cfg.package}/bin/buildbot create-master ${cfg.buildbotDir} rm -f buildbot.tac.new master.cfg.sample
''; '';
serviceConfig = { serviceConfig = {
@ -225,12 +257,11 @@ in {
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
WorkingDirectory = cfg.home; WorkingDirectory = cfg.home;
ExecStart = "${cfg.package}/bin/buildbot start --nodaemon ${cfg.buildbotDir}"; # NOTE: call twistd directly with stdout logging for systemd
ExecStart = "${python.pkgs.twisted}/bin/twistd -o --nodaemon --pidfile= --logfile - --python ${tacFile}";
}; };
}; };
}; };
meta.maintainers = with lib.maintainers; [ nand0p mic92 ]; meta.maintainers = with lib.maintainers; [ nand0p mic92 ];
} }

View File

@ -7,6 +7,40 @@ with lib;
let let
cfg = config.services.buildbot-worker; cfg = config.services.buildbot-worker;
python = cfg.package.pythonModule;
tacFile = pkgs.writeText "aur-buildbot-worker.tac" ''
import os
from io import open
from buildbot_worker.bot import Worker
from twisted.application import service
basedir = '${cfg.buildbotDir}'
# note: this line is matched against to check that this is a worker
# directory; do not edit it.
application = service.Application('buildbot-worker')
master_url_split = '${cfg.masterUrl}'.split(':')
buildmaster_host = master_url_split[0]
port = int(master_url_split[1])
workername = '${cfg.workerUser}'
with open('${cfg.workerPassFile}', 'r', encoding='utf-8') as passwd_file:
passwd = passwd_file.read().strip('\r\n')
keepalive = 600
umask = None
maxdelay = 300
numcpus = None
allow_shutdown = None
s = Worker(buildmaster_host, port, workername, passwd, basedir,
keepalive, umask=umask, maxdelay=maxdelay,
numcpus=numcpus, allow_shutdown=allow_shutdown)
s.setServiceParent(application)
'';
in { in {
options = { options = {
services.buildbot-worker = { services.buildbot-worker = {
@ -59,6 +93,23 @@ in {
description = "Specifies the Buildbot Worker password."; description = "Specifies the Buildbot Worker password.";
}; };
workerPassFile = mkOption {
type = types.path;
description = "File used to store the Buildbot Worker password";
};
hostMessage = mkOption {
default = null;
type = types.nullOr types.str;
description = "Description of this worker";
};
adminMessage = mkOption {
default = null;
type = types.nullOr types.str;
description = "Name of the administrator of this worker";
};
masterUrl = mkOption { masterUrl = mkOption {
default = "localhost:9989"; default = "localhost:9989";
type = types.str; type = types.str;
@ -67,23 +118,24 @@ in {
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pkgs.buildbot-worker; default = pkgs.pythonPackages.buildbot-worker;
defaultText = "pkgs.buildbot-worker"; defaultText = "pkgs.pythonPackages.buildbot-worker";
description = "Package to use for buildbot worker."; description = "Package to use for buildbot worker.";
example = literalExample "pkgs.buildbot-worker"; example = literalExample "pkgs.python3Packages.buildbot-worker";
}; };
packages = mkOption { packages = mkOption {
default = with pkgs; [ python27Packages.twisted git ]; default = with pkgs; [ git ];
example = literalExample "[ pkgs.git ]"; example = literalExample "[ pkgs.git ]";
type = types.listOf types.package; type = types.listOf types.package;
description = "Packages to add to PATH for the buildbot process."; description = "Packages to add to PATH for the buildbot process.";
}; };
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.buildbot-worker.workerPassFile = mkDefault (pkgs.writeText "buildbot-worker-password" cfg.workerPass);
users.groups = optional (cfg.group == "bbworker") { users.groups = optional (cfg.group == "bbworker") {
name = "bbworker"; name = "bbworker";
}; };
@ -104,11 +156,16 @@ in {
after = [ "network.target" "buildbot-master.service" ]; after = [ "network.target" "buildbot-master.service" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = cfg.packages; path = cfg.packages;
environment.PYTHONPATH = "${python.withPackages (p: [ cfg.package ])}/${python.sitePackages}";
preStart = '' preStart = ''
mkdir -vp ${cfg.buildbotDir} mkdir -vp "${cfg.buildbotDir}/info"
rm -fv $cfg.buildbotDir}/buildbot.tac ${optionalString (cfg.hostMessage != null) ''
${cfg.package}/bin/buildbot-worker create-worker ${cfg.buildbotDir} ${cfg.masterUrl} ${cfg.workerUser} ${cfg.workerPass} ln -sf "${pkgs.writeText "buildbot-worker-host" cfg.hostMessage}" "${cfg.buildbotDir}/info/host"
''}
${optionalString (cfg.adminMessage != null) ''
ln -sf "${pkgs.writeText "buildbot-worker-admin" cfg.adminMessage}" "${cfg.buildbotDir}/info/admin"
''}
''; '';
serviceConfig = { serviceConfig = {
@ -116,11 +173,9 @@ in {
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
WorkingDirectory = cfg.home; WorkingDirectory = cfg.home;
Environment = "PYTHONPATH=${cfg.package}/lib/python2.7/site-packages:${pkgs.python27Packages.future}/lib/python2.7/site-packages";
# NOTE: call twistd directly with stdout logging for systemd # NOTE: call twistd directly with stdout logging for systemd
#ExecStart = "${cfg.package}/bin/buildbot-worker start --nodaemon ${cfg.buildbotDir}"; ExecStart = "${python.pkgs.twisted}/bin/twistd --nodaemon --pidfile= --logfile - --python ${tacFile}";
ExecStart = "${pkgs.python27Packages.twisted}/bin/twistd -n -l - -y ${cfg.buildbotDir}/buildbot.tac";
}; };
}; };

View File

@ -257,7 +257,7 @@ in rec {
tests.boot = callSubTests tests/boot.nix {}; tests.boot = callSubTests tests/boot.nix {};
tests.boot-stage1 = callTest tests/boot-stage1.nix {}; tests.boot-stage1 = callTest tests/boot-stage1.nix {};
tests.borgbackup = callTest tests/borgbackup.nix {}; tests.borgbackup = callTest tests/borgbackup.nix {};
tests.buildbot = callTest tests/buildbot.nix {}; tests.buildbot = callSubTests tests/buildbot.nix {};
tests.cadvisor = callTestOnMatchingSystems ["x86_64-linux"] tests/cadvisor.nix {}; tests.cadvisor = callTestOnMatchingSystems ["x86_64-linux"] tests/cadvisor.nix {};
tests.ceph = callTestOnMatchingSystems ["x86_64-linux"] tests/ceph.nix {}; tests.ceph = callTestOnMatchingSystems ["x86_64-linux"] tests/ceph.nix {};
tests.certmgr = callSubTests tests/certmgr.nix {}; tests.certmgr = callSubTests tests/certmgr.nix {};

View File

@ -1,13 +1,17 @@
# Test ensures buildbot master comes up correctly and workers can connect { system ? builtins.currentSystem }:
import ./make-test.nix ({ pkgs, ... } : { with import ../lib/testing.nix { inherit system; };
let
# Test ensures buildbot master comes up correctly and workers can connect
mkBuildbotTest = python: makeTest {
name = "buildbot"; name = "buildbot";
nodes = { nodes = {
bbmaster = { pkgs, ... }: { bbmaster = { pkgs, ... }: {
services.buildbot-master = { services.buildbot-master = {
enable = true; enable = true;
package = pkgs.buildbot-full; package = python.pkgs.buildbot-full;
# NOTE: use fake repo due to no internet in hydra ci # NOTE: use fake repo due to no internet in hydra ci
factorySteps = [ factorySteps = [
@ -19,7 +23,7 @@ import ./make-test.nix ({ pkgs, ... } : {
]; ];
}; };
networking.firewall.allowedTCPPorts = [ 8010 8011 9989 ]; networking.firewall.allowedTCPPorts = [ 8010 8011 9989 ];
environment.systemPackages = with pkgs; [ git buildbot-full ]; environment.systemPackages = with pkgs; [ git python.pkgs.buildbot-full ];
}; };
bbworker = { pkgs, ... }: { bbworker = { pkgs, ... }: {
@ -27,7 +31,7 @@ import ./make-test.nix ({ pkgs, ... } : {
enable = true; enable = true;
masterUrl = "bbmaster:9989"; masterUrl = "bbmaster:9989";
}; };
environment.systemPackages = with pkgs; [ git buildbot-worker ]; environment.systemPackages = with pkgs; [ git python.pkgs.buildbot-worker ];
}; };
gitrepo = { pkgs, ... }: { gitrepo = { pkgs, ... }: {
@ -93,19 +97,21 @@ import ./make-test.nix ({ pkgs, ... } : {
# Test buildbot daemon mode # Test buildbot daemon mode
# NOTE: daemon mode tests disabled due to broken PYTHONPATH child inheritence $bbmaster->execute("buildbot create-master /tmp");
# $bbmaster->execute("mv -fv /tmp/master.cfg.sample /tmp/master.cfg");
#$bbmaster->execute("buildbot create-master /tmp"); $bbmaster->execute("sed -i 's/8010/8011/' /tmp/master.cfg");
#$bbmaster->execute("mv -fv /tmp/master.cfg.sample /tmp/master.cfg"); $bbmaster->execute("buildbot start /tmp");
#$bbmaster->execute("sed -i 's/8010/8011/' /tmp/master.cfg"); $bbworker->execute("nc -z bbmaster 8011");
#$bbmaster->execute("buildbot start /tmp"); $bbworker->waitUntilSucceeds("curl -s --head http://bbmaster:8011") =~ /200 OK/;
#$bbworker->execute("nc -z bbmaster 8011"); $bbmaster->execute("buildbot stop /tmp");
#$bbworker->waitUntilSucceeds("curl -s --head http://bbmaster:8011") =~ /200 OK/; $bbworker->fail("nc -z bbmaster 8011");
#$bbmaster->execute("buildbot stop /tmp");
#$bbworker->fail("nc -z bbmaster 8011");
''; '';
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ nand0p ]; meta.maintainers = with pkgs.stdenv.lib.maintainers; [ nand0p ];
}) };
in {
python2 = mkBuildbotTest pkgs.python2;
python3 = mkBuildbotTest pkgs.python3;
}

View File

@ -1,72 +1,68 @@
{ stdenv, openssh, buildbot-worker, buildbot-pkg, pythonPackages, runCommand, makeWrapper }: { stdenv, lib, buildPythonPackage, fetchPypi, makeWrapper, isPy3k,
python, twisted, jinja2, zope_interface, future, sqlalchemy,
sqlalchemy_migrate, dateutil, txaio, autobahn, pyjwt, treq, txrequests,
txgithub, pyjade, boto3, moto, mock, lz4, setuptoolsTrial, isort, pylint,
flake8, buildbot-worker, buildbot-pkg, glibcLocales }:
let let
withPlugins = plugins: runCommand "wrapped-${package.name}" { withPlugins = plugins: buildPythonPackage {
buildInputs = [ makeWrapper ] ++ plugins; name = "${package.name}-with-plugins";
propagatedBuildInputs = package.propagatedBuildInputs; phases = [ "installPhase" "fixupPhase" ];
passthru.withPlugins = moarPlugins: withPlugins (moarPlugins ++ plugins); buildInputs = [ makeWrapper ];
} '' propagatedBuildInputs = plugins ++ package.propagatedBuildInputs;
installPhase = ''
makeWrapper ${package}/bin/buildbot $out/bin/buildbot \ makeWrapper ${package}/bin/buildbot $out/bin/buildbot \
--prefix PYTHONPATH : "${package}/lib/python2.7/site-packages:$PYTHONPATH" --prefix PYTHONPATH : "${package}/${python.sitePackages}:$PYTHONPATH"
ln -sfv ${package}/lib $out/lib ln -sfv ${package}/lib $out/lib
''; '';
package = pythonPackages.buildPythonApplication rec { passthru = package.passthru // {
withPlugins = morePlugins: withPlugins (morePlugins ++ plugins);
};
};
package = buildPythonPackage rec {
pname = "buildbot"; pname = "buildbot";
version = "1.4.0"; version = "1.4.0";
src = pythonPackages.fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "0dfa926nh642i3bnpzlz0q347zicyx6wswjfqbniri59ya64fncx"; sha256 = "0dfa926nh642i3bnpzlz0q347zicyx6wswjfqbniri59ya64fncx";
}; };
buildInputs = with pythonPackages; [ propagatedBuildInputs = [
lz4
txrequests
pyjade
boto3
moto
txgithub
mock
setuptoolsTrial
isort
pylint
astroid
pyflakes
openssh
buildbot-worker
buildbot-pkg
treq
];
propagatedBuildInputs = with pythonPackages; [
# core # core
twisted twisted
jinja2 jinja2
zope_interface zope_interface
future
sqlalchemy sqlalchemy
sqlalchemy_migrate sqlalchemy_migrate
future
dateutil dateutil
txaio txaio
autobahn autobahn
pyjwt pyjwt
distro
# tls # tls
pyopenssl twisted.extras.tls
service-identity ];
idna
# docs
sphinx
sphinxcontrib-blockdiag
sphinxcontrib-spelling
pyenchant
docutils
ramlfications
sphinx-jinja
checkInputs = [
treq
txrequests
pyjade
boto3
moto
mock
lz4
setuptoolsTrial
isort
pylint
flake8
buildbot-worker
buildbot-pkg
glibcLocales
]; ];
patches = [ patches = [
@ -75,6 +71,8 @@ let
./skip_test_linux_distro.patch ./skip_test_linux_distro.patch
]; ];
LC_ALL = "en_US.UTF-8";
# TimeoutErrors on slow machines -> aarch64 # TimeoutErrors on slow machines -> aarch64
doCheck = !stdenv.isAarch64; doCheck = !stdenv.isAarch64;
@ -82,9 +80,11 @@ let
substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)" substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
''; '';
passthru = { inherit withPlugins; }; passthru = {
inherit withPlugins;
};
meta = with stdenv.lib; { meta = with lib; {
homepage = http://buildbot.net/; homepage = http://buildbot.net/;
description = "Buildbot is an open-source continuous integration framework for automating software build, test, and release processes"; description = "Buildbot is an open-source continuous integration framework for automating software build, test, and release processes";
maintainers = with maintainers; [ nand0p ryansydnor ]; maintainers = with maintainers; [ nand0p ryansydnor ];

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, setuptools }: { lib, buildPythonPackage, fetchPypi, setuptools }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "buildbot-pkg"; pname = "buildbot-pkg";
@ -15,7 +15,7 @@ buildPythonPackage rec {
substituteInPlace buildbot_pkg.py --replace "os.listdir = listdir" "" substituteInPlace buildbot_pkg.py --replace "os.listdir = listdir" ""
''; '';
meta = with stdenv.lib; { meta = with lib; {
homepage = http://buildbot.net/; homepage = http://buildbot.net/;
description = "Buildbot Packaging Helper"; description = "Buildbot Packaging Helper";
maintainers = with maintainers; [ nand0p ryansydnor ]; maintainers = with maintainers; [ nand0p ryansydnor ];

View File

@ -1,19 +1,19 @@
{ stdenv, pythonPackages, buildbot-pkg }: { lib, buildPythonPackage, fetchPypi, buildbot, buildbot-pkg }:
{ {
www = pythonPackages.buildPythonPackage rec { www = buildPythonPackage rec {
pname = "buildbot_www"; pname = "buildbot_www";
version = buildbot-pkg.version; inherit (buildbot-pkg) version;
# NOTE: wheel is used due to buildbot circular dependency # NOTE: wheel is used due to buildbot circular dependency
format = "wheel"; format = "wheel";
src = pythonPackages.fetchPypi { src = fetchPypi {
inherit pname version format; inherit pname version format;
sha256 = "1m5dsp1gn9m5vfh5hnqp8g6hmhw1f1ydnassd33nhk521f2akz0v"; sha256 = "1m5dsp1gn9m5vfh5hnqp8g6hmhw1f1ydnassd33nhk521f2akz0v";
}; };
meta = with stdenv.lib; { meta = with lib; {
homepage = http://buildbot.net/; homepage = http://buildbot.net/;
description = "Buildbot UI"; description = "Buildbot UI";
maintainers = with maintainers; [ nand0p ryansydnor ]; maintainers = with maintainers; [ nand0p ryansydnor ];
@ -21,18 +21,19 @@
}; };
}; };
console-view = pythonPackages.buildPythonPackage rec { console-view = buildPythonPackage rec {
pname = "buildbot-console-view"; pname = "buildbot-console-view";
version = buildbot-pkg.version; inherit (buildbot-pkg) version;
src = pythonPackages.fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "0vblaxmihgb4w9aa5q0wcgvxs7qzajql8s22w0pl9qs494g05s9r"; sha256 = "0vblaxmihgb4w9aa5q0wcgvxs7qzajql8s22w0pl9qs494g05s9r";
}; };
propagatedBuildInputs = with pythonPackages; [ buildbot-pkg ]; propagatedBuildInputs = [ buildbot-pkg ];
checkInputs = [ buildbot ];
meta = with stdenv.lib; { meta = with lib; {
homepage = http://buildbot.net/; homepage = http://buildbot.net/;
description = "Buildbot Console View Plugin"; description = "Buildbot Console View Plugin";
maintainers = with maintainers; [ nand0p ryansydnor ]; maintainers = with maintainers; [ nand0p ryansydnor ];
@ -40,18 +41,19 @@
}; };
}; };
waterfall-view = pythonPackages.buildPythonPackage rec { waterfall-view = buildPythonPackage rec {
pname = "buildbot-waterfall-view"; pname = "buildbot-waterfall-view";
version = buildbot-pkg.version; inherit (buildbot-pkg) version;
src = pythonPackages.fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "18v1a6dapwjc2s9hi0cv3ry3s048w84md908zwaa3033gz3zwzy7"; sha256 = "18v1a6dapwjc2s9hi0cv3ry3s048w84md908zwaa3033gz3zwzy7";
}; };
propagatedBuildInputs = with pythonPackages; [ buildbot-pkg ]; propagatedBuildInputs = [ buildbot-pkg ];
checkInputs = [ buildbot ];
meta = with stdenv.lib; { meta = with lib; {
homepage = http://buildbot.net/; homepage = http://buildbot.net/;
description = "Buildbot Waterfall View Plugin"; description = "Buildbot Waterfall View Plugin";
maintainers = with maintainers; [ nand0p ryansydnor ]; maintainers = with maintainers; [ nand0p ryansydnor ];
@ -59,18 +61,19 @@
}; };
}; };
grid-view = pythonPackages.buildPythonPackage rec { grid-view = buildPythonPackage rec {
pname = "buildbot-grid-view"; pname = "buildbot-grid-view";
version = buildbot-pkg.version; inherit (buildbot-pkg) version;
src = pythonPackages.fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "0iawsy892v6rn88hsgiiwaf689jqzhnb2wbxh6zkz3c0hvq4g0qd"; sha256 = "0iawsy892v6rn88hsgiiwaf689jqzhnb2wbxh6zkz3c0hvq4g0qd";
}; };
propagatedBuildInputs = with pythonPackages; [ buildbot-pkg ]; propagatedBuildInputs = [ buildbot-pkg ];
checkInputs = [ buildbot ];
meta = with stdenv.lib; { meta = with lib; {
homepage = http://buildbot.net/; homepage = http://buildbot.net/;
description = "Buildbot Grid View Plugin"; description = "Buildbot Grid View Plugin";
maintainers = with maintainers; [ nand0p ]; maintainers = with maintainers; [ nand0p ];
@ -78,23 +81,23 @@
}; };
}; };
wsgi-dashboards = pythonPackages.buildPythonPackage rec { wsgi-dashboards = buildPythonPackage rec {
pname = "buildbot-wsgi-dashboards"; pname = "buildbot-wsgi-dashboards";
version = buildbot-pkg.version; inherit (buildbot-pkg) version;
src = pythonPackages.fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "00cpjna3bffh1qbq6a3sqffd1g7qhbrmn9gpzxf9k38jam6jgfpz"; sha256 = "00cpjna3bffh1qbq6a3sqffd1g7qhbrmn9gpzxf9k38jam6jgfpz";
}; };
propagatedBuildInputs = with pythonPackages; [ buildbot-pkg ]; propagatedBuildInputs = [ buildbot-pkg ];
checkInputs = [ buildbot ];
meta = with stdenv.lib; { meta = with lib; {
homepage = http://buildbot.net/; homepage = http://buildbot.net/;
description = "Buildbot WSGI dashboards Plugin"; description = "Buildbot WSGI dashboards Plugin";
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ ];
license = licenses.gpl2; license = licenses.gpl2;
}; };
}; };
} }

View File

@ -1,22 +1,23 @@
{ stdenv, pythonPackages }: { lib, buildPythonPackage, fetchPypi, python, setuptoolsTrial, mock, twisted, future }:
pythonPackages.buildPythonApplication (rec { buildPythonPackage (rec {
pname = "buildbot-worker"; pname = "buildbot-worker";
version = "1.4.0"; version = "1.4.0";
src = pythonPackages.fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "12zvf4c39b6s4g1f2w407q8kkw602m88rc1ggi4w9pkw3bwbxrgy"; sha256 = "12zvf4c39b6s4g1f2w407q8kkw602m88rc1ggi4w9pkw3bwbxrgy";
}; };
buildInputs = with pythonPackages; [ setuptoolsTrial mock ]; propagatedBuildInputs = [ twisted future ];
propagatedBuildInputs = with pythonPackages; [ twisted future ];
checkInputs = [ setuptoolsTrial mock ];
postPatch = '' postPatch = ''
substituteInPlace buildbot_worker/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)" substituteInPlace buildbot_worker/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
''; '';
meta = with stdenv.lib; { meta = with lib; {
homepage = http://buildbot.net/; homepage = http://buildbot.net/;
description = "Buildbot Worker Daemon"; description = "Buildbot Worker Daemon";
maintainers = with maintainers; [ nand0p ryansydnor ]; maintainers = with maintainers; [ nand0p ryansydnor ];

View File

@ -49,6 +49,11 @@ mapAliases ({
bashCompletion = bash-completion; # Added 2016-09-28 bashCompletion = bash-completion; # Added 2016-09-28
bridge_utils = bridge-utils; # added 2015-02-20 bridge_utils = bridge-utils; # added 2015-02-20
btrfsProgs = btrfs-progs; # added 2016-01-03 btrfsProgs = btrfs-progs; # added 2016-01-03
buildbot = pythonPackages.buildbot; # added 2018-10-11
buildbot-full = pythonPackages.buildbot-full; # added 2018-10-11
buildbot-pkg = pythonPackages.buildbot-pkg; # added 2018-10-11
buildbot-ui = pythonPackages.buildbot-ui; # added 2018-10-11
buildbot-worker = pythonPackages.buildbot-worker; # added 2018-10-11
bundler_HEAD = bundler; # added 2015-11-15 bundler_HEAD = bundler; # added 2015-11-15
cantarell_fonts = cantarell-fonts; # added 2018-03-03 cantarell_fonts = cantarell-fonts; # added 2018-03-03
checkbashism = checkbashisms; # added 2016-08-16 checkbashism = checkbashisms; # added 2016-08-16

View File

@ -8135,21 +8135,6 @@ with pkgs;
buck = callPackage ../development/tools/build-managers/buck { }; buck = callPackage ../development/tools/build-managers/buck { };
buildbot = callPackage ../development/tools/build-managers/buildbot {
pythonPackages = python2Packages;
};
buildbot-worker = callPackage ../development/tools/build-managers/buildbot/worker.nix {
pythonPackages = python2Packages;
};
buildbot-pkg = callPackage ../development/tools/build-managers/buildbot/pkg.nix {
inherit (python2Packages) buildPythonPackage fetchPypi setuptools;
};
buildbot-plugins = callPackages ../development/tools/build-managers/buildbot/plugins.nix {
pythonPackages = python2Packages;
};
buildbot-ui = buildbot.withPlugins (with self.buildbot-plugins; [ www ]);
buildbot-full = buildbot.withPlugins (with self.buildbot-plugins; [ www console-view waterfall-view grid-view wsgi-dashboards ]);
buildkite-agent = buildkite-agent2; buildkite-agent = buildkite-agent2;
buildkite-agent2 = callPackage ../development/tools/continuous-integration/buildkite-agent/2.x.nix { }; buildkite-agent2 = callPackage ../development/tools/continuous-integration/buildkite-agent/2.x.nix { };
buildkite-agent3 = callPackage ../development/tools/continuous-integration/buildkite-agent/3.x.nix { }; buildkite-agent3 = callPackage ../development/tools/continuous-integration/buildkite-agent/3.x.nix { };

View File

@ -1421,6 +1421,13 @@ in {
bugzilla = callPackage ../development/python-modules/bugzilla { }; bugzilla = callPackage ../development/python-modules/bugzilla { };
buildbot = callPackage ../development/python-modules/buildbot { };
buildbot-plugins = pkgs.recurseIntoAttrs (callPackage ../development/python-modules/buildbot/plugins.nix { });
buildbot-ui = self.buildbot.withPlugins (with self.buildbot-plugins; [ www ]);
buildbot-full = self.buildbot.withPlugins (with self.buildbot-plugins; [ www console-view waterfall-view grid-view wsgi-dashboards ]);
buildbot-worker = callPackage ../development/python-modules/buildbot/worker.nix { };
buildbot-pkg = callPackage ../development/python-modules/buildbot/pkg.nix { };
check-manifest = callPackage ../development/python-modules/check-manifest { }; check-manifest = callPackage ../development/python-modules/check-manifest { };
devpi-common = callPackage ../development/python-modules/devpi-common { }; devpi-common = callPackage ../development/python-modules/devpi-common { };