aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixops/modules/buildbot/default.nix40
-rw-r--r--overlays/python-packages/apprise/default.nix16
-rw-r--r--overlays/python-packages/buildbot.nix8
-rw-r--r--overlays/python-packages/default.nix28
-rw-r--r--overlays/python-packages/wokkel/default.nix16
-rw-r--r--pkgs/default.nix5
-rw-r--r--pkgs/python-packages/apprise/apprise.json (renamed from overlays/python-packages/apprise/apprise.json)0
-rw-r--r--pkgs/python-packages/apprise/default.nix11
-rw-r--r--pkgs/python-packages/buildbot/plugins/buildslist/bower.nix (renamed from nixops/modules/buildbot/bower.nix)0
-rw-r--r--pkgs/python-packages/buildbot/plugins/buildslist/buildslist.json (renamed from nixops/modules/buildbot/buildslist.json)4
-rw-r--r--pkgs/python-packages/buildbot/plugins/buildslist/default.nix40
-rw-r--r--pkgs/python-packages/buildbot/plugins/default.nix7
-rw-r--r--pkgs/python-packages/default.nix6
-rw-r--r--pkgs/python-packages/wokkel.nix11
14 files changed, 117 insertions, 75 deletions
diff --git a/nixops/modules/buildbot/default.nix b/nixops/modules/buildbot/default.nix
index 5cf833b..d7dd479 100644
--- a/nixops/modules/buildbot/default.nix
+++ b/nixops/modules/buildbot/default.nix
@@ -1,44 +1,6 @@
1{ lib, pkgs, config, myconfig, mylibs, ... }: 1{ lib, pkgs, config, myconfig, mylibs, ... }:
2let 2let
3 varDir = "/var/lib/buildbot"; 3 varDir = "/var/lib/buildbot";
4 buildslist_src = mylibs.fetchedGitPrivate ./buildslist.json;
5 buildslist_yarn = mylibs.yarn2nixPackage.mkYarnModules rec {
6 name = "buildslist-yarn-modules";
7 pname = name;
8 inherit (pkgs.buildbot-pkg) version;
9 packageJSON = "${buildslist_src.src}/package.json";
10 yarnLock = "${buildslist_src.src}/yarn.lock";
11 pkgConfig = {
12 all = { buildInputs = [ mylibs.yarn2nixPackage.src ]; };
13 };
14 };
15 buildslist_bower = pkgs.buildBowerComponents {
16 name = "buildslist";
17 generated = ./bower.nix;
18 src = "${buildslist_src.src}/guanlecoja/";
19 };
20
21 buildslist = pkgs.python3Packages.buildPythonPackage rec {
22 pname = "buildbot-buildslist";
23 inherit (pkgs.buildbot-pkg) version;
24
25 preConfigure = ''
26 export HOME=$PWD
27 cp -a ${buildslist_yarn}/node_modules .
28 chmod -R u+w node_modules
29 cp -a ${buildslist_bower}/bower_components ./libs
30 chmod -R u+w libs
31 '';
32 propagatedBuildInputs = with pkgs.python3Packages; [
33 (klein.overridePythonAttrs(old: { checkPhase = ""; }))
34 buildbot-pkg
35 ];
36 nativeBuildInputs = with pkgs; [ yarn nodejs ];
37 buildInputs = [ buildslist_yarn buildslist_bower ];
38
39 doCheck = false;
40 src = buildslist_src.src;
41 };
42 buildbot_common = pkgs.python3Packages.buildPythonPackage rec { 4 buildbot_common = pkgs.python3Packages.buildPythonPackage rec {
43 name = "buildbot_common"; 5 name = "buildbot_common";
44 src = ./common; 6 src = ./common;
@@ -48,7 +10,7 @@ let
48 cp -a $src $out/${pkgs.python3.pythonForBuild.sitePackages}/buildbot_common 10 cp -a $src $out/${pkgs.python3.pythonForBuild.sitePackages}/buildbot_common
49 ''; 11 '';
50 }; 12 };
51 buildbot = pkgs.python3Packages.buildbot-full.withPlugins ([ buildslist ]); 13 buildbot = pkgs.python3Packages.buildbot-full;
52in 14in
53{ 15{
54 options = { 16 options = {
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 @@
1self: super: {
2 python3 = super.python3.override {
3 packageOverrides = python-self: python-super: {
4 apprise = python-self.buildPythonPackage rec {
5 pname = "apprise";
6 version = "0.7.4";
7 src = (self.mylibs.fetchedGithub ./apprise.json).src;
8 propagatedBuildInputs = with python-self; [ decorator
9 requests requests_oauthlib oauthlib urllib3 six click
10 markdown pyyaml sleekxmpp
11 ];
12 doChecks = false;
13 };
14 };
15 };
16}
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 @@
1self: super: {
2 pythonOverrides = self.buildPythonOverrides (pyself: pysuper: {
3 buildbot-plugins = pysuper.buildbot-plugins // {
4 buildslist = self.python3PackagesPlus.buildbot-plugins.buildslist;
5 };
6 buildbot-full = pysuper.buildbot-full.withPlugins [ pyself.buildbot-plugins.buildslist ];
7 }) super.pythonOverrides;
8}
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 @@
1let
2 fromMyPythonPackages = name: self: super: {
3 pythonOverrides = self.buildPythonOverrides (pyself: pysuper: {
4 "${name}" = self."${pyself.python.pname}PackagesPlus"."${name}";
5 }) super.pythonOverrides;
6 };
7in
1{ 8{
2 wokkel = import ./wokkel; 9 # https://github.com/NixOS/nixpkgs/issues/44426
3 apprise = import ./apprise; 10 # needs to come before all other in alphabetical order (or make use of
11 # lib.mkBefore)
12 __pythonOverlayFix = self: super: let
13 pyNames = [ "python3" "python36" "python37" ];
14 overriddenPython = name: [
15 { inherit name; value = super.${name}.override { packageOverrides = self.pythonOverrides; }; }
16 { name = "${name}Packages"; value = self.recurseIntoAttrs self.${name}.pkgs; }
17 ];
18 overriddenPythons = builtins.concatLists (map overriddenPython pyNames);
19 in {
20 pythonOverrides = pyself: pysuper: {};
21 buildPythonOverrides = newOverrides: currentOverrides: super.lib.composeExtensions newOverrides currentOverrides;
22 } // super.lib.attrsets.listToAttrs overriddenPythons;
23
24
25 apprise = fromMyPythonPackages "apprise";
26 buildbot = import ./buildbot.nix;
27 wokkel = fromMyPythonPackages "wokkel";
4} 28}
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 @@
1self: super: {
2 python3 = super.python3.override {
3 packageOverrides = python-self: python-super: {
4 wokkel = python-self.buildPythonPackage rec {
5 pname = "wokkel";
6 version = "18.0.0";
7 src = python-self.fetchPypi {
8 inherit pname version;
9 sha256 = "1spq44gg8gsviqx1dvlmjpgfc0wk0jpyx4ap01y2pad1ai9cw016";
10 };
11 propagatedBuildInputs = with python-self; [ twisted.extras.tls twisted incremental dateutil ];
12 doChecks = false;
13 };
14 };
15 };
16}
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 18fc3b3..26b32e1 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -43,4 +43,9 @@ rec {
43 private = if builtins.pathExists (./. + "/private") 43 private = if builtins.pathExists (./. + "/private")
44 then import ./private { inherit pkgs; } 44 then import ./private { inherit pkgs; }
45 else { webapps = {}; }; 45 else { webapps = {}; };
46
47 python3PackagesPlus = callPackage ./python-packages {
48 python = python3;
49 inherit mylibs;
50 };
46} 51}
diff --git a/overlays/python-packages/apprise/apprise.json b/pkgs/python-packages/apprise/apprise.json
index b408ea4..b408ea4 100644
--- a/overlays/python-packages/apprise/apprise.json
+++ b/pkgs/python-packages/apprise/apprise.json
diff --git a/pkgs/python-packages/apprise/default.nix b/pkgs/python-packages/apprise/default.nix
new file mode 100644
index 0000000..d310599
--- /dev/null
+++ b/pkgs/python-packages/apprise/default.nix
@@ -0,0 +1,11 @@
1{ mylibs, pythonPackages }: with pythonPackages;
2buildPythonPackage rec {
3 pname = "apprise";
4 version = "0.7.4";
5 src = (mylibs.fetchedGithub ./apprise.json).src;
6 propagatedBuildInputs = [ decorator requests
7 requests_oauthlib oauthlib urllib3 six click markdown pyyaml
8 sleekxmpp
9 ];
10 doChecks = false;
11}
diff --git a/nixops/modules/buildbot/bower.nix b/pkgs/python-packages/buildbot/plugins/buildslist/bower.nix
index 8b26e0a..8b26e0a 100644
--- a/nixops/modules/buildbot/bower.nix
+++ b/pkgs/python-packages/buildbot/plugins/buildslist/bower.nix
diff --git a/nixops/modules/buildbot/buildslist.json b/pkgs/python-packages/buildbot/plugins/buildslist/buildslist.json
index 2418d17..27ca94c 100644
--- a/nixops/modules/buildbot/buildslist.json
+++ b/pkgs/python-packages/buildbot/plugins/buildslist/buildslist.json
@@ -2,11 +2,11 @@
2 "tag": "9e87787-master", 2 "tag": "9e87787-master",
3 "meta": { 3 "meta": {
4 "name": "buildslist", 4 "name": "buildslist",
5 "url": "gitolite@git.immae.eu:perso/Immae/Projets/Buildbot/buildslist", 5 "url": "https://git.immae.eu/perso/Immae/Projets/Buildbot/buildslist",
6 "branch": "master" 6 "branch": "master"
7 }, 7 },
8 "git": { 8 "git": {
9 "url": "gitolite@git.immae.eu:perso/Immae/Projets/Buildbot/buildslist", 9 "url": "https://git.immae.eu/perso/Immae/Projets/Buildbot/buildslist",
10 "rev": "9e87787b40f4d6435218268e516be56eacd8d17b", 10 "rev": "9e87787b40f4d6435218268e516be56eacd8d17b",
11 "sha256": "0bli9w0xwpij23jblggz2zwhb7y3gkjdvsppcy6ia3m0x0siclpi", 11 "sha256": "0bli9w0xwpij23jblggz2zwhb7y3gkjdvsppcy6ia3m0x0siclpi",
12 "fetchSubmodules": true 12 "fetchSubmodules": true
diff --git a/pkgs/python-packages/buildbot/plugins/buildslist/default.nix b/pkgs/python-packages/buildbot/plugins/buildslist/default.nix
new file mode 100644
index 0000000..372968a
--- /dev/null
+++ b/pkgs/python-packages/buildbot/plugins/buildslist/default.nix
@@ -0,0 +1,40 @@
1{ mylibs, buildBowerComponents, pythonPackages, yarn, nodejs }:
2let
3 buildslist_src = mylibs.fetchedGit ./buildslist.json;
4 buildslist_yarn = mylibs.yarn2nixPackage.mkYarnModules rec {
5 name = "buildslist-yarn-modules";
6 pname = name;
7 inherit (pythonPackages.buildbot-pkg) version;
8 packageJSON = "${buildslist_src.src}/package.json";
9 yarnLock = "${buildslist_src.src}/yarn.lock";
10 pkgConfig = {
11 all = { buildInputs = [ mylibs.yarn2nixPackage.src ]; };
12 };
13 };
14 buildslist_bower = buildBowerComponents {
15 name = "buildslist";
16 generated = ./bower.nix;
17 src = "${buildslist_src.src}/guanlecoja/";
18 };
19in
20pythonPackages.buildPythonPackage rec {
21 pname = "buildbot-buildslist";
22 inherit (pythonPackages.buildbot-pkg) version;
23
24 preConfigure = ''
25 export HOME=$PWD
26 cp -a ${buildslist_yarn}/node_modules .
27 chmod -R u+w node_modules
28 cp -a ${buildslist_bower}/bower_components ./libs
29 chmod -R u+w libs
30 '';
31 propagatedBuildInputs = with pythonPackages; [
32 (klein.overridePythonAttrs(old: { checkPhase = ""; }))
33 buildbot-pkg
34 ];
35 nativeBuildInputs = [ yarn nodejs ];
36 buildInputs = [ buildslist_yarn buildslist_bower ];
37
38 doCheck = false;
39 src = buildslist_src.src;
40}
diff --git a/pkgs/python-packages/buildbot/plugins/default.nix b/pkgs/python-packages/buildbot/plugins/default.nix
new file mode 100644
index 0000000..4952819
--- /dev/null
+++ b/pkgs/python-packages/buildbot/plugins/default.nix
@@ -0,0 +1,7 @@
1{ mylibs, callPackage, python }:
2{
3 buildslist = callPackage ./buildslist {
4 inherit mylibs;
5 pythonPackages = python.pkgs;
6 };
7}
diff --git a/pkgs/python-packages/default.nix b/pkgs/python-packages/default.nix
new file mode 100644
index 0000000..747bbe6
--- /dev/null
+++ b/pkgs/python-packages/default.nix
@@ -0,0 +1,6 @@
1{ mylibs, callPackage, python }:
2{
3 apprise = callPackage ./apprise { inherit mylibs; pythonPackages = python.pkgs; };
4 buildbot-plugins = callPackage ./buildbot/plugins { inherit mylibs python; };
5 wokkel = callPackage ./wokkel.nix { pythonPackages = python.pkgs; };
6}
diff --git a/pkgs/python-packages/wokkel.nix b/pkgs/python-packages/wokkel.nix
new file mode 100644
index 0000000..b34caec
--- /dev/null
+++ b/pkgs/python-packages/wokkel.nix
@@ -0,0 +1,11 @@
1{ pythonPackages }: with pythonPackages;
2buildPythonPackage rec {
3 pname = "wokkel";
4 version = "18.0.0";
5 src = fetchPypi {
6 inherit pname version;
7 sha256 = "1spq44gg8gsviqx1dvlmjpgfc0wk0jpyx4ap01y2pad1ai9cw016";
8 };
9 propagatedBuildInputs = [ twisted.extras.tls twisted incremental dateutil ];
10 doChecks = false;
11}