2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
2023-04-12 12:48:02 +00:00
|
|
|
, buildPythonApplication
|
2022-12-17 10:02:37 +00:00
|
|
|
, fetchPypi
|
|
|
|
, makeWrapper
|
|
|
|
, pythonOlder
|
|
|
|
, python
|
|
|
|
, twisted
|
|
|
|
, jinja2
|
|
|
|
, msgpack
|
|
|
|
, zope_interface
|
|
|
|
, sqlalchemy
|
|
|
|
, alembic
|
|
|
|
, python-dateutil
|
|
|
|
, txaio
|
|
|
|
, autobahn
|
|
|
|
, pyjwt
|
|
|
|
, pyyaml
|
|
|
|
, treq
|
|
|
|
, txrequests
|
|
|
|
, pypugjs
|
|
|
|
, boto3
|
|
|
|
, moto
|
2023-08-22 20:05:09 +00:00
|
|
|
, markdown
|
2022-12-17 10:02:37 +00:00
|
|
|
, lz4
|
|
|
|
, setuptoolsTrial
|
|
|
|
, buildbot-worker
|
|
|
|
, buildbot-plugins
|
2023-04-12 12:48:02 +00:00
|
|
|
, buildbot-pkg
|
2022-12-17 10:02:37 +00:00
|
|
|
, parameterized
|
|
|
|
, git
|
|
|
|
, openssh
|
2022-05-18 14:49:53 +00:00
|
|
|
, glibcLocales
|
2021-12-06 16:07:01 +00:00
|
|
|
, nixosTests
|
2023-04-12 12:48:02 +00:00
|
|
|
, callPackage
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2023-04-12 12:48:02 +00:00
|
|
|
withPlugins = plugins: buildPythonApplication {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "${package.pname}-with-plugins";
|
|
|
|
inherit (package) version;
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "other";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
dontUnpack = true;
|
2021-09-18 10:52:07 +00:00
|
|
|
dontBuild = true;
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-12-17 10:02:37 +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);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
package = buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "buildbot";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "3.9.0";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-NP2nk9uVIyZOyil4KX+NyG1Z9YTSxDVA2ceMuO6JNH4=";
|
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
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
treq
|
|
|
|
txrequests
|
2020-12-25 13:55:36 +00:00
|
|
|
pypugjs
|
2020-04-24 23:36:52 +00:00
|
|
|
boto3
|
|
|
|
moto
|
2023-08-22 20:05:09 +00:00
|
|
|
markdown
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
2023-02-02 18:25:31 +00:00
|
|
|
# tests in this file are flaky, see https://github.com/buildbot/buildbot/issues/6776
|
|
|
|
rm buildbot/test/integration/test_try_client.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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; {
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "An open-source continuous integration framework for automating software build, test, and release processes";
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://buildbot.net/";
|
|
|
|
changelog = "https://github.com/buildbot/buildbot/releases/tag/v${version}";
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ryansydnor lopsided98 ];
|
2022-12-17 10:02:37 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in package
|