Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at domenkozar-patch-1 147 lines 3.1 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, makeWrapper 6, pythonOlder 7, python 8, twisted 9, jinja2 10, msgpack 11, zope_interface 12, sqlalchemy 13, alembic 14, python-dateutil 15, txaio 16, autobahn 17, pyjwt 18, pyyaml 19, treq 20, txrequests 21, pypugjs 22, boto3 23, moto 24, mock 25, lz4 26, setuptoolsTrial 27, buildbot-worker 28, buildbot-pkg 29, buildbot-plugins 30, parameterized 31, git 32, openssh 33, glibcLocales 34, nixosTests 35}: 36 37let 38 withPlugins = plugins: buildPythonPackage { 39 pname = "${package.pname}-with-plugins"; 40 inherit (package) version; 41 format = "other"; 42 43 dontUnpack = true; 44 dontBuild = true; 45 doCheck = false; 46 47 nativeBuildInputs = [ 48 makeWrapper 49 ]; 50 51 propagatedBuildInputs = plugins ++ package.propagatedBuildInputs; 52 53 installPhase = '' 54 makeWrapper ${package}/bin/buildbot $out/bin/buildbot \ 55 --prefix PYTHONPATH : "${package}/${python.sitePackages}:$PYTHONPATH" 56 ln -sfv ${package}/lib $out/lib 57 ''; 58 59 passthru = package.passthru // { 60 withPlugins = morePlugins: withPlugins (morePlugins ++ plugins); 61 }; 62 }; 63 64 package = buildPythonPackage rec { 65 pname = "buildbot"; 66 version = "3.7.0"; 67 format = "setuptools"; 68 69 disabled = pythonOlder "3.7"; 70 71 src = fetchPypi { 72 inherit pname version; 73 hash = "sha256-YMLT1SP6NenJIUVTvr58GVrtNXHw+bhfgMpZu3revG4="; 74 }; 75 76 propagatedBuildInputs = [ 77 # core 78 twisted 79 jinja2 80 msgpack 81 zope_interface 82 sqlalchemy 83 alembic 84 python-dateutil 85 txaio 86 autobahn 87 pyjwt 88 pyyaml 89 ] 90 # tls 91 ++ twisted.optional-dependencies.tls; 92 93 checkInputs = [ 94 treq 95 txrequests 96 pypugjs 97 boto3 98 moto 99 mock 100 lz4 101 setuptoolsTrial 102 buildbot-worker 103 buildbot-pkg 104 buildbot-plugins.www 105 parameterized 106 git 107 openssh 108 glibcLocales 109 ]; 110 111 patches = [ 112 # This patch disables the test that tries to read /etc/os-release which 113 # is not accessible in sandboxed builds. 114 ./skip_test_linux_distro.patch 115 ]; 116 117 postPatch = '' 118 substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)" 119 ''; 120 121 # TimeoutErrors on slow machines -> aarch64 122 doCheck = !stdenv.isAarch64; 123 124 preCheck = '' 125 export LC_ALL="en_US.UTF-8" 126 export PATH="$out/bin:$PATH" 127 128 # remove testfile which is missing configuration file from sdist 129 rm buildbot/test/integration/test_graphql.py 130 ''; 131 132 passthru = { 133 inherit withPlugins; 134 tests.buildbot = nixosTests.buildbot; 135 updateScript = ./update.sh; 136 }; 137 138 meta = with lib; { 139 description = "An open-source continuous integration framework for automating software build, test, and release processes"; 140 homepage = "https://buildbot.net/"; 141 changelog = "https://github.com/buildbot/buildbot/releases/tag/v${version}"; 142 maintainers = with maintainers; [ ryansydnor lopsided98 ]; 143 license = licenses.gpl2Only; 144 broken = stdenv.isDarwin; 145 }; 146 }; 147in package