2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchpatch, fetchPypi, makeWrapper, isPy3k
|
2022-05-18 14:49:53 +00:00
|
|
|
, python, twisted, jinja2, msgpack, zope_interface, sqlalchemy, alembic
|
|
|
|
, python-dateutil, txaio, autobahn, pyjwt, pyyaml, treq, txrequests, pypugjs
|
2022-06-16 17:23:12 +00:00
|
|
|
, boto3, moto, mock, lz4, setuptoolsTrial
|
2022-05-18 14:49:53 +00:00
|
|
|
, buildbot-worker, buildbot-pkg, buildbot-plugins, parameterized, git, openssh
|
|
|
|
, glibcLocales
|
2021-12-06 16:07:01 +00:00
|
|
|
, nixosTests
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
withPlugins = plugins: buildPythonPackage {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "${package.pname}-with-plugins";
|
|
|
|
inherit (package) version;
|
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
dontUnpack = true;
|
2021-09-18 10:52:07 +00:00
|
|
|
dontBuild = true;
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
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";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "3.5.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-woGHdCan5qTp00toNkWa821EgVQMrPK+OWXoqFcgIDQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
# core
|
|
|
|
twisted
|
|
|
|
jinja2
|
2022-05-18 14:49:53 +00:00
|
|
|
msgpack
|
2020-04-24 23:36:52 +00:00
|
|
|
zope_interface
|
|
|
|
sqlalchemy
|
2021-12-06 16:07:01 +00:00
|
|
|
alembic
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
txaio
|
|
|
|
autobahn
|
|
|
|
pyjwt
|
|
|
|
pyyaml
|
|
|
|
]
|
|
|
|
# tls
|
2022-06-16 17:23:12 +00:00
|
|
|
++ twisted.optional-dependencies.tls;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
treq
|
|
|
|
txrequests
|
2020-12-25 13:55:36 +00:00
|
|
|
pypugjs
|
2020-04-24 23:36:52 +00:00
|
|
|
boto3
|
|
|
|
moto
|
|
|
|
mock
|
2021-08-05 21:33:18 +00:00
|
|
|
lz4
|
2020-04-24 23:36:52 +00:00
|
|
|
setuptoolsTrial
|
|
|
|
buildbot-worker
|
|
|
|
buildbot-pkg
|
|
|
|
buildbot-plugins.www
|
|
|
|
parameterized
|
|
|
|
git
|
|
|
|
openssh
|
|
|
|
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
|
2022-06-16 17:23:12 +00:00
|
|
|
(fetchpatch{
|
|
|
|
url = "https://github.com/buildbot/buildbot/commit/54b8f62902122b0091319a96d0f9edd4195ab4c6.patch";
|
|
|
|
stripLen = 1;
|
|
|
|
sha256 = "sha256-OqW3ZQK0bfqPG3YlrBbrSEEKsM/XqY2NO862ZD/DgHs=";
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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"
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
# remove testfile which is missing configuration file from sdist
|
|
|
|
rm buildbot/test/integration/test_graphql.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit withPlugins;
|
|
|
|
tests.buildbot = nixosTests.buildbot;
|
2021-08-05 21:33:18 +00:00
|
|
|
updateScript = ./update.sh;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://buildbot.net/";
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "An open-source continuous integration framework for automating software build, test, and release processes";
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ryansydnor lopsided98 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in package
|