buildbot: move out of python3.pkgs

By moving it out we can start apply overrides to python dependendencies
starting with sqlalchemy.

This fixes the build with the current version.

+68 -31
+6 -5
nixos/modules/services/continuous-integration/buildbot/master.nix
··· 8 8 cfg = config.services.buildbot-master; 9 9 opt = options.services.buildbot-master; 10 10 11 - python = cfg.package.pythonModule; 11 + package = pkgs.python3.pkgs.toPythonModule cfg.package; 12 + python = package.pythonModule; 12 13 13 14 escapeStr = escape [ "'" ]; 14 15 ··· 212 213 213 214 package = mkOption { 214 215 type = types.package; 215 - default = pkgs.python3Packages.buildbot-full; 216 - defaultText = literalExpression "pkgs.python3Packages.buildbot-full"; 216 + default = pkgs.buildbot-full; 217 + defaultText = literalExpression "pkgs.buildbot-full"; 217 218 description = lib.mdDoc "Package to use for buildbot."; 218 - example = literalExpression "pkgs.python3Packages.buildbot"; 219 + example = literalExpression "pkgs.buildbot"; 219 220 }; 220 221 221 222 packages = mkOption { ··· 255 256 after = [ "network-online.target" ]; 256 257 wantedBy = [ "multi-user.target" ]; 257 258 path = cfg.packages ++ cfg.pythonPackages python.pkgs; 258 - environment.PYTHONPATH = "${python.withPackages (self: cfg.pythonPackages self ++ [ cfg.package ])}/${python.sitePackages}"; 259 + environment.PYTHONPATH = "${python.withPackages (self: cfg.pythonPackages self ++ [ package ])}/${python.sitePackages}"; 259 260 260 261 preStart = '' 261 262 mkdir -vp "${cfg.buildbotDir}"
+4 -3
nixos/modules/services/continuous-integration/buildbot/worker.nix
··· 8 8 cfg = config.services.buildbot-worker; 9 9 opt = options.services.buildbot-worker; 10 10 11 - python = cfg.package.pythonModule; 11 + package = pkgs.python3.pkgs.toPythonModule cfg.package; 12 + python = package.pythonModule; 12 13 13 14 tacFile = pkgs.writeText "aur-buildbot-worker.tac" '' 14 15 import os ··· 129 130 130 131 package = mkOption { 131 132 type = types.package; 132 - default = pkgs.python3Packages.buildbot-worker; 133 + default = pkgs.buildbot-worker; 133 134 defaultText = literalExpression "pkgs.python3Packages.buildbot-worker"; 134 135 description = lib.mdDoc "Package to use for buildbot worker."; 135 136 example = literalExpression "pkgs.python2Packages.buildbot-worker"; ··· 168 169 after = [ "network.target" "buildbot-master.service" ]; 169 170 wantedBy = [ "multi-user.target" ]; 170 171 path = cfg.packages; 171 - environment.PYTHONPATH = "${python.withPackages (p: [ cfg.package ])}/${python.sitePackages}"; 172 + environment.PYTHONPATH = "${python.withPackages (p: [ package ])}/${python.sitePackages}"; 172 173 173 174 preStart = '' 174 175 mkdir -vp "${cfg.buildbotDir}/info"
+2 -2
nixos/tests/buildbot.nix
··· 23 23 ]; 24 24 }; 25 25 networking.firewall.allowedTCPPorts = [ 8010 8011 9989 ]; 26 - environment.systemPackages = with pkgs; [ git python3Packages.buildbot-full ]; 26 + environment.systemPackages = with pkgs; [ git buildbot-full ]; 27 27 }; 28 28 29 29 bbworker = { pkgs, ... }: { ··· 31 31 enable = true; 32 32 masterUrl = "bbmaster:9989"; 33 33 }; 34 - environment.systemPackages = with pkgs; [ git python3Packages.buildbot-worker ]; 34 + environment.systemPackages = with pkgs; [ git buildbot-worker ]; 35 35 }; 36 36 37 37 gitrepo = { pkgs, ... }: {
+5 -3
pkgs/development/python-modules/buildbot/default.nix pkgs/development/tools/continuous-integration/buildbot/master.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , buildPythonPackage 4 + , buildPythonApplication 4 5 , fetchPypi 5 6 , makeWrapper 6 7 , pythonOlder ··· 25 26 , lz4 26 27 , setuptoolsTrial 27 28 , buildbot-worker 28 - , buildbot-pkg 29 29 , buildbot-plugins 30 + , buildbot-pkg 30 31 , parameterized 31 32 , git 32 33 , openssh 33 34 , glibcLocales 34 35 , nixosTests 36 + , callPackage 35 37 }: 36 38 37 39 let 38 - withPlugins = plugins: buildPythonPackage { 40 + withPlugins = plugins: buildPythonApplication { 39 41 pname = "${package.pname}-with-plugins"; 40 42 inherit (package) version; 41 43 format = "other"; ··· 61 63 }; 62 64 }; 63 65 64 - package = buildPythonPackage rec { 66 + package = buildPythonApplication rec { 65 67 pname = "buildbot"; 66 68 version = "3.7.0"; 67 69 format = "setuptools";
pkgs/development/python-modules/buildbot/pkg.nix pkgs/development/tools/continuous-integration/buildbot/pkg.nix
+1 -2
pkgs/development/python-modules/buildbot/plugins.nix pkgs/development/tools/continuous-integration/buildbot/plugins.nix
··· 1 - { lib, buildPythonPackage, fetchPypi, buildbot-pkg, mock, cairosvg, klein, jinja2 }: 2 - 1 + { lib, buildPythonPackage, fetchPypi, callPackage, mock, cairosvg, klein, jinja2, buildbot-pkg }: 3 2 { 4 3 www = buildPythonPackage rec { 5 4 pname = "buildbot-www";
pkgs/development/python-modules/buildbot/skip_test_linux_distro.patch pkgs/development/tools/continuous-integration/buildbot/skip_test_linux_distro.patch
pkgs/development/python-modules/buildbot/update.sh pkgs/development/tools/continuous-integration/buildbot/update.sh
pkgs/development/python-modules/buildbot/worker.nix pkgs/development/tools/continuous-integration/buildbot/worker.nix
+42
pkgs/development/tools/continuous-integration/buildbot/default.nix
··· 1 + { python3 2 + , recurseIntoAttrs 3 + , callPackage 4 + }: 5 + let 6 + python = python3.override { 7 + packageOverrides = self: super: { 8 + sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec { 9 + version = "1.4.40"; 10 + src = super.fetchPypi { 11 + pname = "SQLAlchemy"; 12 + inherit version; 13 + hash = "sha256-RKZgUGCAzJdeHfpXdv5fYxXdxiane1C/Du4YsDieomU="; 14 + }; 15 + }); 16 + moto = super.moto.overridePythonAttrs (oldAttrs: rec { 17 + # a lot of tests -> very slow, we already build them when building python packages 18 + doCheck = false; 19 + }); 20 + }; 21 + }; 22 + 23 + buildbot-pkg = python.pkgs.callPackage ./pkg.nix { 24 + inherit buildbot; 25 + }; 26 + buildbot-worker = python3.pkgs.callPackage ./worker.nix { 27 + inherit buildbot; 28 + }; 29 + buildbot = python.pkgs.callPackage ./master.nix { 30 + inherit buildbot-pkg buildbot-worker buildbot-plugins; 31 + }; 32 + buildbot-plugins = recurseIntoAttrs (callPackage ./plugins.nix { 33 + inherit buildbot-pkg; 34 + }); 35 + in 36 + { 37 + inherit buildbot buildbot-plugins buildbot-worker; 38 + buildbot-ui = buildbot.withPlugins (with buildbot-plugins; [ www ]); 39 + buildbot-full = buildbot.withPlugins (with buildbot-plugins; [ 40 + www console-view waterfall-view grid-view wsgi-dashboards badges 41 + ]); 42 + }
+2 -4
pkgs/top-level/all-packages.nix
··· 3079 3079 bucklespring-libinput = callPackage ../applications/audio/bucklespring { }; 3080 3080 bucklespring-x11 = callPackage ../applications/audio/bucklespring { legacy = true; }; 3081 3081 3082 - buildbot = with python3Packages; toPythonApplication buildbot; 3083 - buildbot-ui = with python3Packages; toPythonApplication buildbot-ui; 3084 - buildbot-full = with python3Packages; toPythonApplication buildbot-full; 3085 - buildbot-worker = with python3Packages; toPythonApplication buildbot-worker; 3082 + inherit (python3.pkgs.callPackage ../development/tools/continuous-integration/buildbot {}) 3083 + buildbot buildbot-ui buildbot-full buildbot-plugins buildbot-worker; 3086 3084 3087 3085 bunyan-rs = callPackage ../development/tools/bunyan-rs { }; 3088 3086
+6
pkgs/top-level/python-aliases.nix
··· 48 48 blockdiagcontrib-cisco = throw "blockdiagcontrib-cisco is not compatible with blockdiag 2.0.0 and has been removed."; # added 2020-11-29 49 49 bsblan = python-bsblan; # added 2022-11-04 50 50 btchip = btchip-python; # added 2023-03-03 51 + buildbot = throw "use pkgs.buildbot instead"; # added 2022-04-07 52 + buildbot-ui = throw "use pkgs.buildbot-ui instead"; # added 2022-04-07 53 + buildbot-full = throw "use pkgs.buildbot-full instead"; # added 2022-04-07 54 + buildbot-plugins = throw "use pkgs.buildbot-plugins instead"; # added 2022-04-07 55 + buildbot-worker = throw "use pkgs.buildbot-worker instead"; # added 2022-04-07 56 + buildbot-pkg = throw "buildbot-pkg has been removed, it's only internally used in buildbot"; # added 2022-04-07 51 57 bt_proximity = bt-proximity; # added 2021-07-02 52 58 BTrees = btrees; # added 2023-02-19 53 59 carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18
-12
pkgs/top-level/python-packages.nix
··· 1513 1513 1514 1514 buienradar = callPackage ../development/python-modules/buienradar { }; 1515 1515 1516 - buildbot = callPackage ../development/python-modules/buildbot { }; 1517 - 1518 - buildbot-ui = self.buildbot.withPlugins (with self.buildbot-plugins; [ www ]); 1519 - 1520 - buildbot-full = self.buildbot.withPlugins (with self.buildbot-plugins; [ www console-view waterfall-view grid-view wsgi-dashboards badges ]); 1521 - 1522 - buildbot-pkg = callPackage ../development/python-modules/buildbot/pkg.nix { }; 1523 - 1524 - buildbot-plugins = pkgs.recurseIntoAttrs (callPackage ../development/python-modules/buildbot/plugins.nix { }); 1525 - 1526 - buildbot-worker = callPackage ../development/python-modules/buildbot/worker.nix { }; 1527 - 1528 1516 build = callPackage ../development/python-modules/build { }; 1529 1517 1530 1518 buildcatrust = callPackage ../development/python-modules/buildcatrust { };