Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 108 lines 2.9 kB view raw
1{ stdenv, lib, buildPythonPackage, fetchPypi, makeWrapper, isPy3k, 2 python, twisted, jinja2, zope_interface, sqlalchemy, 3 sqlalchemy_migrate, dateutil, txaio, autobahn, pyjwt, pyyaml, unidiff, treq, 4 txrequests, pypugjs, boto3, moto, mock, python-lz4, setuptoolsTrial, 5 isort, pylint, flake8, buildbot-worker, buildbot-pkg, buildbot-plugins, 6 parameterized, git, openssh, glibcLocales, ldap3, nixosTests }: 7 8let 9 withPlugins = plugins: buildPythonPackage { 10 name = "${package.name}-with-plugins"; 11 phases = [ "installPhase" "fixupPhase" ]; 12 nativeBuildInputs = [ makeWrapper ]; 13 propagatedBuildInputs = plugins ++ package.propagatedBuildInputs; 14 15 installPhase = '' 16 makeWrapper ${package}/bin/buildbot $out/bin/buildbot \ 17 --prefix PYTHONPATH : "${package}/${python.sitePackages}:$PYTHONPATH" 18 ln -sfv ${package}/lib $out/lib 19 ''; 20 21 passthru = package.passthru // { 22 withPlugins = morePlugins: withPlugins (morePlugins ++ plugins); 23 }; 24 }; 25 26 package = buildPythonPackage rec { 27 pname = "buildbot"; 28 version = "3.1.1"; 29 30 src = fetchPypi { 31 inherit pname version; 32 sha256 = "0vh2v1qs65kwcj1x8r1wj2g456kflspyz7mjara9ph9qs7j97y74"; 33 }; 34 35 propagatedBuildInputs = [ 36 # core 37 twisted 38 jinja2 39 zope_interface 40 sqlalchemy 41 sqlalchemy_migrate 42 dateutil 43 txaio 44 autobahn 45 pyjwt 46 pyyaml 47 unidiff 48 ] 49 # tls 50 ++ twisted.extras.tls; 51 52 checkInputs = [ 53 treq 54 txrequests 55 pypugjs 56 boto3 57 moto 58 mock 59 python-lz4 60 setuptoolsTrial 61 isort 62 pylint 63 flake8 64 buildbot-worker 65 buildbot-pkg 66 buildbot-plugins.www 67 parameterized 68 git 69 openssh 70 glibcLocales 71 # optional dependency that was accidentally made required for tests 72 # https://github.com/buildbot/buildbot/pull/5857 73 ldap3 74 ]; 75 76 patches = [ 77 # This patch disables the test that tries to read /etc/os-release which 78 # is not accessible in sandboxed builds. 79 ./skip_test_linux_distro.patch 80 ]; 81 82 postPatch = '' 83 substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)" 84 ''; 85 86 # TimeoutErrors on slow machines -> aarch64 87 doCheck = !stdenv.isAarch64; 88 89 preCheck = '' 90 export LC_ALL="en_US.UTF-8" 91 export PATH="$out/bin:$PATH" 92 ''; 93 94 disabled = !isPy3k; 95 96 passthru = { 97 inherit withPlugins; 98 tests.buildbot = nixosTests.buildbot; 99 }; 100 101 meta = with lib; { 102 homepage = "https://buildbot.net/"; 103 description = "An open-source continuous integration framework for automating software build, test, and release processes"; 104 maintainers = with maintainers; [ ryansydnor lopsided98 ]; 105 license = licenses.gpl2; 106 }; 107 }; 108in package