aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/buildbot
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2019-10-05 12:43:18 +0000
committerKatharina Fey <kookie@spacekookie.de>2019-10-05 12:44:52 +0000
commitcf85056ba64caf3267d43255ef4a1243e9c8ee3b (patch)
tree3051519e9c8275b870aac43f80af875715c9d124 /nixpkgs/pkgs/development/python-modules/buildbot
parent1148b1d122bc03e9a3665856c9b7bb96bd4e3994 (diff)
parent2436c27541b2f52deea3a4c1691216a02152e729 (diff)
Add 'nixpkgs/' from commit '2436c27541b2f52deea3a4c1691216a02152e729'
git-subtree-dir: nixpkgs git-subtree-mainline: 1148b1d122bc03e9a3665856c9b7bb96bd4e3994 git-subtree-split: 2436c27541b2f52deea3a4c1691216a02152e729
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/buildbot')
-rw-r--r--nixpkgs/pkgs/development/python-modules/buildbot/default.nix102
-rw-r--r--nixpkgs/pkgs/development/python-modules/buildbot/pkg.nix24
-rw-r--r--nixpkgs/pkgs/development/python-modules/buildbot/plugins.nix102
-rw-r--r--nixpkgs/pkgs/development/python-modules/buildbot/skip_test_linux_distro.patch11
-rw-r--r--nixpkgs/pkgs/development/python-modules/buildbot/worker.nix28
5 files changed, 267 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/buildbot/default.nix b/nixpkgs/pkgs/development/python-modules/buildbot/default.nix
new file mode 100644
index 00000000000..c19fc280c7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/buildbot/default.nix
@@ -0,0 +1,102 @@
+{ stdenv, lib, buildPythonPackage, fetchPypi, makeWrapper, isPy3k,
+ python, twisted, jinja2, zope_interface, future, sqlalchemy,
+ sqlalchemy_migrate, dateutil, txaio, autobahn, pyjwt, pyyaml, treq,
+ txrequests, pyjade, boto3, moto, mock, python-lz4, setuptoolsTrial,
+ isort, pylint, flake8, buildbot-worker, buildbot-pkg, parameterized,
+ git, glibcLocales }:
+
+let
+ withPlugins = plugins: buildPythonPackage {
+ name = "${package.name}-with-plugins";
+ phases = [ "installPhase" "fixupPhase" ];
+ buildInputs = [ makeWrapper ];
+ propagatedBuildInputs = plugins ++ package.propagatedBuildInputs;
+
+ installPhase = ''
+ makeWrapper ${package}/bin/buildbot $out/bin/buildbot \
+ --prefix PYTHONPATH : "${package}/${python.sitePackages}:$PYTHONPATH"
+ ln -sfv ${package}/lib $out/lib
+ '';
+
+ passthru = package.passthru // {
+ withPlugins = morePlugins: withPlugins (morePlugins ++ plugins);
+ };
+ };
+
+ package = buildPythonPackage rec {
+ pname = "buildbot";
+ version = "2.4.0";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "141ad2g1j5y0n5cdnd18m55ss0gqjlz5ky85rb6qfn73dgw42vmz";
+ };
+
+ propagatedBuildInputs = [
+ # core
+ twisted
+ jinja2
+ zope_interface
+ sqlalchemy
+ sqlalchemy_migrate
+ dateutil
+ txaio
+ autobahn
+ pyjwt
+ pyyaml
+
+ # tls
+ twisted.extras.tls
+ ];
+
+ checkInputs = [
+ treq
+ txrequests
+ pyjade
+ boto3
+ moto
+ mock
+ python-lz4
+ setuptoolsTrial
+ isort
+ pylint
+ flake8
+ buildbot-worker
+ buildbot-pkg
+ parameterized
+ git
+ glibcLocales
+ ];
+
+ patches = [
+ # This patch disables the test that tries to read /etc/os-release which
+ # is not accessible in sandboxed builds.
+ ./skip_test_linux_distro.patch
+ ];
+
+ postPatch = ''
+ substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
+ '';
+
+ # TimeoutErrors on slow machines -> aarch64
+ doCheck = !stdenv.isAarch64;
+
+ preCheck = ''
+ export LC_ALL="en_US.UTF-8"
+ export PATH="$out/bin:$PATH"
+ '';
+
+ disabled = !isPy3k;
+
+ passthru = {
+ inherit withPlugins;
+ };
+
+ meta = with lib; {
+ homepage = http://buildbot.net/;
+ description = "Buildbot is an open-source continuous integration framework for automating software build, test, and release processes";
+ maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ];
+ license = licenses.gpl2;
+ };
+ };
+in package
diff --git a/nixpkgs/pkgs/development/python-modules/buildbot/pkg.nix b/nixpkgs/pkgs/development/python-modules/buildbot/pkg.nix
new file mode 100644
index 00000000000..dababe48e99
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/buildbot/pkg.nix
@@ -0,0 +1,24 @@
+{ lib, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+ pname = "buildbot-pkg";
+ version = "2.4.0";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0na336jwibgbix8fr4jki1gqys44kkm0a8q32llcr2z08igs4mvy";
+ };
+
+ postPatch = ''
+ # Their listdir function filters out `node_modules` folders.
+ # Do we have to care about that with Nix...?
+ substituteInPlace buildbot_pkg.py --replace "os.listdir = listdir" ""
+ '';
+
+ meta = with lib; {
+ homepage = http://buildbot.net/;
+ description = "Buildbot Packaging Helper";
+ maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ];
+ license = licenses.gpl2;
+ };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/buildbot/plugins.nix b/nixpkgs/pkgs/development/python-modules/buildbot/plugins.nix
new file mode 100644
index 00000000000..e31085a2498
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/buildbot/plugins.nix
@@ -0,0 +1,102 @@
+{ lib, buildPythonPackage, fetchPypi, buildbot, buildbot-pkg, mock }:
+
+{
+ www = buildPythonPackage rec {
+ pname = "buildbot-www";
+ inherit (buildbot-pkg) version;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0g3m5z8yska245r1x9n85b4br8b63i4zca2qn3qspf62b1wzmxmd";
+ };
+
+ buildInputs = [ buildbot buildbot-pkg mock ];
+
+ meta = with lib; {
+ homepage = http://buildbot.net/;
+ description = "Buildbot UI";
+ maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ];
+ license = licenses.gpl2;
+ };
+ };
+
+ console-view = buildPythonPackage rec {
+ pname = "buildbot-console-view";
+ inherit (buildbot-pkg) version;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0p7az9mb09c4bl0j37w28wflzygq9vy8rjbbnhlfbs6py6mjdagr";
+ };
+
+ buildInputs = [ buildbot-pkg ];
+ checkInputs = [ buildbot ];
+
+ meta = with lib; {
+ homepage = http://buildbot.net/;
+ description = "Buildbot Console View Plugin";
+ maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ];
+ license = licenses.gpl2;
+ };
+ };
+
+ waterfall-view = buildPythonPackage rec {
+ pname = "buildbot-waterfall-view";
+ inherit (buildbot-pkg) version;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0ba0a7q7ii7sipvifxs9ldkcs4b975skndarmirbphc797993hj1";
+ };
+
+ buildInputs = [ buildbot-pkg ];
+ checkInputs = [ buildbot ];
+
+ meta = with lib; {
+ homepage = http://buildbot.net/;
+ description = "Buildbot Waterfall View Plugin";
+ maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ];
+ license = licenses.gpl2;
+ };
+ };
+
+ grid-view = buildPythonPackage rec {
+ pname = "buildbot-grid-view";
+ inherit (buildbot-pkg) version;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0dvchhjzmfbbrxqm8dlmwck22z99pgnflxk3cyn0wbb1qskhd9cv";
+ };
+
+ buildInputs = [ buildbot-pkg ];
+ checkInputs = [ buildbot ];
+
+ meta = with lib; {
+ homepage = http://buildbot.net/;
+ description = "Buildbot Grid View Plugin";
+ maintainers = with maintainers; [ nand0p lopsided98 ];
+ license = licenses.gpl2;
+ };
+ };
+
+ wsgi-dashboards = buildPythonPackage rec {
+ pname = "buildbot-wsgi-dashboards";
+ inherit (buildbot-pkg) version;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0w9p3y89rqsmqiacwj2avir42r0xjr2yri14v3ay6yar5391r8wa";
+ };
+
+ buildInputs = [ buildbot-pkg ];
+ checkInputs = [ buildbot ];
+
+ meta = with lib; {
+ homepage = http://buildbot.net/;
+ description = "Buildbot WSGI dashboards Plugin";
+ maintainers = with maintainers; [ lopsided98 ];
+ license = licenses.gpl2;
+ };
+ };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/buildbot/skip_test_linux_distro.patch b/nixpkgs/pkgs/development/python-modules/buildbot/skip_test_linux_distro.patch
new file mode 100644
index 00000000000..8fe5c7b56b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/buildbot/skip_test_linux_distro.patch
@@ -0,0 +1,11 @@
+diff -Nur buildbot-0.9.6/buildbot/test/unit/test_buildbot_net_usage_data.py buildbot-0.9.6.patched/buildbot/test/unit/test_buildbot_net_usage_data.py
+--- buildbot-0.9.6/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-04-19 16:57:02.000000000 +0200
++++ buildbot-0.9.6.patched/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-05-04 12:22:54.575762551 +0200
+@@ -147,6 +147,7 @@
+ _sendBuildbotNetUsageData({'foo': 'bar'})
+
+ def test_linux_distro(self):
++ raise SkipTest("NixOS sandboxed builds hides /etc/os-release")
+ system = platform.system()
+ if system != "Linux":
+ raise SkipTest("test is only for linux")
diff --git a/nixpkgs/pkgs/development/python-modules/buildbot/worker.nix b/nixpkgs/pkgs/development/python-modules/buildbot/worker.nix
new file mode 100644
index 00000000000..8cfc56678c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/buildbot/worker.nix
@@ -0,0 +1,28 @@
+{ lib, buildPythonPackage, fetchPypi, setuptoolsTrial, mock, twisted, future,
+ coreutils }:
+
+buildPythonPackage (rec {
+ pname = "buildbot-worker";
+ version = "2.4.0";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "04dk1jg0yq0rcm7j7pn7l1pqqjhiyvwppnhc1b7106sx2cdj2yb2";
+ };
+
+ propagatedBuildInputs = [ twisted future ];
+
+ checkInputs = [ setuptoolsTrial mock ];
+
+ postPatch = ''
+ substituteInPlace buildbot_worker/scripts/logwatcher.py \
+ --replace /usr/bin/tail "${coreutils}/bin/tail"
+ '';
+
+ meta = with lib; {
+ homepage = http://buildbot.net/;
+ description = "Buildbot Worker Daemon";
+ maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ];
+ license = licenses.gpl2;
+ };
+})