diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/buildbot')
5 files changed, 269 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 000000000000..7459fc6f981b --- /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, + 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.3.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0qzr6my8zvaj0a1jwyaf254rdgm1xcyq8zp4b6fa5aqigfld4dfg"; + }; + + propagatedBuildInputs = [ + # core + twisted + jinja2 + zope_interface + future + 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 + 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 ]; + 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 000000000000..8de1572b48c0 --- /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.3.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0bpqiih15b5kzx1r542m8j7ydbnmgzhdnkaxv0z7gjv21k78m5i5"; + }; + + 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 ]; + 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 000000000000..e03524ea5ada --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/buildbot/plugins.nix @@ -0,0 +1,104 @@ +{ lib, buildPythonPackage, fetchPypi, buildbot, buildbot-pkg }: + +{ + www = buildPythonPackage rec { + pname = "buildbot_www"; + inherit (buildbot-pkg) version; + + # NOTE: wheel is used due to buildbot circular dependency + format = "wheel"; + + src = fetchPypi { + inherit pname version format; + python = "py3"; + sha256 = "1ii01py78wkda9x4lqm0bxqmb4dhvbdmmz7sncm1lw7bhmhqh84w"; + }; + + meta = with lib; { + homepage = http://buildbot.net/; + description = "Buildbot UI"; + maintainers = with maintainers; [ nand0p ryansydnor ]; + license = licenses.gpl2; + }; + }; + + console-view = buildPythonPackage rec { + pname = "buildbot-console-view"; + inherit (buildbot-pkg) version; + + src = fetchPypi { + inherit pname version; + sha256 = "1y523hadw3398jwfpmi2f4g0s6dp9y191qzycrsbvbj147dp0qra"; + }; + + propagatedBuildInputs = [ buildbot-pkg ]; + checkInputs = [ buildbot ]; + + meta = with lib; { + homepage = http://buildbot.net/; + description = "Buildbot Console View Plugin"; + maintainers = with maintainers; [ nand0p ryansydnor ]; + license = licenses.gpl2; + }; + }; + + waterfall-view = buildPythonPackage rec { + pname = "buildbot-waterfall-view"; + inherit (buildbot-pkg) version; + + src = fetchPypi { + inherit pname version; + sha256 = "1prfr03igcmagydvxqhrh6k6wz16vk6fwgrm143jh3xmml6f16ll"; + }; + + propagatedBuildInputs = [ buildbot-pkg ]; + checkInputs = [ buildbot ]; + + meta = with lib; { + homepage = http://buildbot.net/; + description = "Buildbot Waterfall View Plugin"; + maintainers = with maintainers; [ nand0p ryansydnor ]; + license = licenses.gpl2; + }; + }; + + grid-view = buildPythonPackage rec { + pname = "buildbot-grid-view"; + inherit (buildbot-pkg) version; + + src = fetchPypi { + inherit pname version; + sha256 = "1xkqiwxjppyns2s0239zzvbnr8b7vdakypj95mca89mmnyniflxj"; + }; + + propagatedBuildInputs = [ buildbot-pkg ]; + checkInputs = [ buildbot ]; + + meta = with lib; { + homepage = http://buildbot.net/; + description = "Buildbot Grid View Plugin"; + maintainers = with maintainers; [ nand0p ]; + license = licenses.gpl2; + }; + }; + + wsgi-dashboards = buildPythonPackage rec { + pname = "buildbot-wsgi-dashboards"; + inherit (buildbot-pkg) version; + + src = fetchPypi { + inherit pname version; + sha256 = "1jhvq61x0bzh03nd2ac11swdjn0ndnx3ac7x9v3m3v0pgr08rc28"; + }; + + propagatedBuildInputs = [ buildbot-pkg ]; + checkInputs = [ buildbot ]; + + meta = with lib; { + homepage = http://buildbot.net/; + description = "Buildbot WSGI dashboards Plugin"; + maintainers = with maintainers; [ ]; + 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 000000000000..8fe5c7b56b4f --- /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 000000000000..0ca2570496a0 --- /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.3.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0lvgqcayd4f32895g3cwrbnjw6p94nrggbq7wfz5mwbhpgg6hv52"; + }; + + 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 ]; + license = licenses.gpl2; + }; +}) |