about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/haxor-news/default.nix3
-rw-r--r--pkgs/applications/misc/privacyidea/default.nix4
-rw-r--r--pkgs/applications/networking/p2p/tribler/aiohttp-apispec.nix37
-rw-r--r--pkgs/applications/networking/p2p/tribler/apispec.nix47
-rw-r--r--pkgs/applications/networking/p2p/tribler/default.nix3
-rw-r--r--pkgs/applications/office/watson/default.nix3
6 files changed, 91 insertions, 6 deletions
diff --git a/pkgs/applications/misc/haxor-news/default.nix b/pkgs/applications/misc/haxor-news/default.nix
index 43c2eb2422417..c93d31f66305b 100644
--- a/pkgs/applications/misc/haxor-news/default.nix
+++ b/pkgs/applications/misc/haxor-news/default.nix
@@ -15,7 +15,8 @@ let
           sha256 = "09h1153wgr5x2ny7ds0w2m81n3bb9j8hjb8sjfnrg506r01clkyx";
         };
       });
-      click = self.callPackage ../../../development/python-modules/click/7.nix { };
+      # Use click 7
+      click = self.callPackage ../../../development/python2-modules/click/default.nix { };
     };
   };
 in
diff --git a/pkgs/applications/misc/privacyidea/default.nix b/pkgs/applications/misc/privacyidea/default.nix
index 912cb9b94b1be..2a3a1a47410df 100644
--- a/pkgs/applications/misc/privacyidea/default.nix
+++ b/pkgs/applications/misc/privacyidea/default.nix
@@ -20,8 +20,8 @@ let
           sha256 = "ae2f05671588762dd83a21d8b18c51fe355e86783e24594995ff8d7380dffe38";
         };
       });
-      werkzeug = self.callPackage ../../../development/python-modules/werkzeug/1.nix { };
-      flask = self.callPackage ../../../development/python-modules/flask/1.nix { };
+      werkzeug = self.callPackage ../../../development/python2-modules/werkzeug { };
+      flask = self.callPackage ../../../development/python2-modules/flask { };
       sqlsoup = super.sqlsoup.overrideAttrs ({ meta ? {}, ... }: {
         meta = meta // { broken = false; };
       });
diff --git a/pkgs/applications/networking/p2p/tribler/aiohttp-apispec.nix b/pkgs/applications/networking/p2p/tribler/aiohttp-apispec.nix
new file mode 100644
index 0000000000000..4e1f5ee6ca70a
--- /dev/null
+++ b/pkgs/applications/networking/p2p/tribler/aiohttp-apispec.nix
@@ -0,0 +1,37 @@
+{ lib, buildPythonPackage, fetchPypi, pythonOlder
+, aiohttp, webargs, fetchFromGitHub, callPackage
+}:
+
+let
+  apispec3 = callPackage ./apispec.nix {};
+  jinja2 = callPackage ../../../../development/python2-modules/jinja2 {};
+in
+buildPythonPackage rec {
+  pname = "aiohttp-apispec";
+  version = "unstable-2021-21-08";
+
+  # unstable so we can use latest webargs
+  src = fetchFromGitHub {
+    owner = "maximdanilchenko";
+    repo = "aiohttp-apispec";
+    rev = "cfa19646394480dda289f6b7af19b7d50f245d81";
+    sha256 = "uEgDRAlMjTa4rvdE3fkORCHIlCLzxPJJ2/m4ZRU3eIQ=";
+    fetchSubmodules = false;
+  };
+
+  propagatedBuildInputs = [ aiohttp webargs apispec3 jinja2 ];
+
+  pythonImportsCheck = [
+    "aiohttp_apispec"
+  ];
+
+  # Requires pytest-sanic, currently broken in nixpkgs
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Build and document REST APIs with aiohttp and apispec";
+    homepage = "https://github.com/maximdanilchenko/aiohttp-apispec/";
+    license = licenses.mit;
+    maintainers = [ maintainers.viric ];
+  };
+}
diff --git a/pkgs/applications/networking/p2p/tribler/apispec.nix b/pkgs/applications/networking/p2p/tribler/apispec.nix
new file mode 100644
index 0000000000000..e60a440df3f4b
--- /dev/null
+++ b/pkgs/applications/networking/p2p/tribler/apispec.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pyyaml
+, prance
+, marshmallow
+, pytestCheckHook
+, mock
+, openapi-spec-validator
+}:
+
+buildPythonPackage rec {
+  pname = "apispec";
+  version = "3.3.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "d23ebd5b71e541e031b02a19db10b5e6d5ef8452c552833e3e1afc836b40b1ad";
+  };
+
+  propagatedBuildInputs = [
+    pyyaml
+    prance
+  ];
+
+  postPatch = ''
+    rm tests/test_ext_marshmallow.py
+  '';
+
+  checkInputs = [
+    openapi-spec-validator
+    marshmallow
+    mock
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "apispec"
+  ];
+
+  meta = with lib; {
+    description = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification";
+    homepage = "https://github.com/marshmallow-code/apispec";
+    license = licenses.mit;
+    maintainers = [ maintainers.viric ];
+  };
+}
diff --git a/pkgs/applications/networking/p2p/tribler/default.nix b/pkgs/applications/networking/p2p/tribler/default.nix
index 774aea642d43b..6a8f93a293814 100644
--- a/pkgs/applications/networking/p2p/tribler/default.nix
+++ b/pkgs/applications/networking/p2p/tribler/default.nix
@@ -6,8 +6,7 @@ let
   libtorrent = (python3.pkgs.toPythonModule (
     libtorrent-rasterbar-1_2_x.override { python = python3; })).python;
 
-  aiohttp-apispec = python3.pkgs.callPackage 
-    ../../../../development/python-modules/aiohttp-apispec/unstable.nix { };
+  aiohttp-apispec = python3.pkgs.callPackage ./aiohttp-apispec.nix { };
 in
 stdenv.mkDerivation rec {
   pname = "tribler";
diff --git a/pkgs/applications/office/watson/default.nix b/pkgs/applications/office/watson/default.nix
index 7584debc20f2d..cf4fa359749f9 100644
--- a/pkgs/applications/office/watson/default.nix
+++ b/pkgs/applications/office/watson/default.nix
@@ -10,7 +10,8 @@ let
   # Workaround the issue by providing click 7 explicitly.
   python = python3.override {
     packageOverrides = self: super: {
-      click = self.callPackage ../../../development/python-modules/click/7.nix { };
+      # Use click 7
+      click = self.callPackage ../../../development/python2-modules/click/default.nix { };
     };
   };
 in with python.pkgs; buildPythonApplication rec {