From b798cf6d60baf5aad5438ba5936259c64d87299c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 12 May 2019 10:49:32 +0200 Subject: Move buildbot plugin buildslist to pkgs --- overlays/python-packages/apprise/apprise.json | 15 -------------- overlays/python-packages/apprise/default.nix | 16 --------------- overlays/python-packages/buildbot.nix | 8 ++++++++ overlays/python-packages/default.nix | 28 +++++++++++++++++++++++++-- overlays/python-packages/wokkel/default.nix | 16 --------------- 5 files changed, 34 insertions(+), 49 deletions(-) delete mode 100644 overlays/python-packages/apprise/apprise.json delete mode 100644 overlays/python-packages/apprise/default.nix create mode 100644 overlays/python-packages/buildbot.nix delete mode 100644 overlays/python-packages/wokkel/default.nix (limited to 'overlays') diff --git a/overlays/python-packages/apprise/apprise.json b/overlays/python-packages/apprise/apprise.json deleted file mode 100644 index b408ea4..0000000 --- a/overlays/python-packages/apprise/apprise.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "c9b957c-master", - "meta": { - "name": "apprise", - "url": "https://github.com/caronc/apprise", - "branch": "master" - }, - "github": { - "owner": "caronc", - "repo": "apprise", - "rev": "c9b957c4341e7d43e5be6463bd317a7401d083d9", - "sha256": "01zz4mh3xvplrm5xalzrcncnh0jq5y51pmdxkr4hdd6dz9wx0mbg", - "fetchSubmodules": true - } -} diff --git a/overlays/python-packages/apprise/default.nix b/overlays/python-packages/apprise/default.nix deleted file mode 100644 index 99e04ad..0000000 --- a/overlays/python-packages/apprise/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -self: super: { - python3 = super.python3.override { - packageOverrides = python-self: python-super: { - apprise = python-self.buildPythonPackage rec { - pname = "apprise"; - version = "0.7.4"; - src = (self.mylibs.fetchedGithub ./apprise.json).src; - propagatedBuildInputs = with python-self; [ decorator - requests requests_oauthlib oauthlib urllib3 six click - markdown pyyaml sleekxmpp - ]; - doChecks = false; - }; - }; - }; -} diff --git a/overlays/python-packages/buildbot.nix b/overlays/python-packages/buildbot.nix new file mode 100644 index 0000000..ccf2f6a --- /dev/null +++ b/overlays/python-packages/buildbot.nix @@ -0,0 +1,8 @@ +self: super: { + pythonOverrides = self.buildPythonOverrides (pyself: pysuper: { + buildbot-plugins = pysuper.buildbot-plugins // { + buildslist = self.python3PackagesPlus.buildbot-plugins.buildslist; + }; + buildbot-full = pysuper.buildbot-full.withPlugins [ pyself.buildbot-plugins.buildslist ]; + }) super.pythonOverrides; +} diff --git a/overlays/python-packages/default.nix b/overlays/python-packages/default.nix index 7313f9e..8a9949e 100644 --- a/overlays/python-packages/default.nix +++ b/overlays/python-packages/default.nix @@ -1,4 +1,28 @@ +let + fromMyPythonPackages = name: self: super: { + pythonOverrides = self.buildPythonOverrides (pyself: pysuper: { + "${name}" = self."${pyself.python.pname}PackagesPlus"."${name}"; + }) super.pythonOverrides; + }; +in { - wokkel = import ./wokkel; - apprise = import ./apprise; + # https://github.com/NixOS/nixpkgs/issues/44426 + # needs to come before all other in alphabetical order (or make use of + # lib.mkBefore) + __pythonOverlayFix = self: super: let + pyNames = [ "python3" "python36" "python37" ]; + overriddenPython = name: [ + { inherit name; value = super.${name}.override { packageOverrides = self.pythonOverrides; }; } + { name = "${name}Packages"; value = self.recurseIntoAttrs self.${name}.pkgs; } + ]; + overriddenPythons = builtins.concatLists (map overriddenPython pyNames); + in { + pythonOverrides = pyself: pysuper: {}; + buildPythonOverrides = newOverrides: currentOverrides: super.lib.composeExtensions newOverrides currentOverrides; + } // super.lib.attrsets.listToAttrs overriddenPythons; + + + apprise = fromMyPythonPackages "apprise"; + buildbot = import ./buildbot.nix; + wokkel = fromMyPythonPackages "wokkel"; } diff --git a/overlays/python-packages/wokkel/default.nix b/overlays/python-packages/wokkel/default.nix deleted file mode 100644 index 5d0ab4a..0000000 --- a/overlays/python-packages/wokkel/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -self: super: { - python3 = super.python3.override { - packageOverrides = python-self: python-super: { - wokkel = python-self.buildPythonPackage rec { - pname = "wokkel"; - version = "18.0.0"; - src = python-self.fetchPypi { - inherit pname version; - sha256 = "1spq44gg8gsviqx1dvlmjpgfc0wk0jpyx4ap01y2pad1ai9cw016"; - }; - propagatedBuildInputs = with python-self; [ twisted.extras.tls twisted incremental dateutil ]; - doChecks = false; - }; - }; - }; -} -- cgit v1.2.3