Merge pull request #159978 from fabaff/fix-tribler
tribler: remove local apispec
This commit is contained in:
commit
c871c5fee1
5 changed files with 95 additions and 120 deletions
|
@ -1,37 +0,0 @@
|
||||||
{ 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 ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
{ 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 ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,12 +1,15 @@
|
||||||
{ stdenv, lib, fetchurl, python3, makeWrapper
|
{ lib
|
||||||
, libtorrent-rasterbar-1_2_x, qt5
|
, stdenv
|
||||||
|
, fetchurl
|
||||||
|
, python3
|
||||||
|
, makeWrapper
|
||||||
|
, libtorrent-rasterbar-1_2_x
|
||||||
|
, qt5
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
libtorrent = (python3.pkgs.toPythonModule (
|
libtorrent = (python3.pkgs.toPythonModule (
|
||||||
libtorrent-rasterbar-1_2_x.override { python = python3; })).python;
|
libtorrent-rasterbar-1_2_x.override { python = python3; })).python;
|
||||||
|
|
||||||
aiohttp-apispec = python3.pkgs.callPackage ./aiohttp-apispec.nix { };
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tribler";
|
pname = "tribler";
|
||||||
|
@ -14,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.xz";
|
url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.xz";
|
||||||
sha256 = "1x45z23d1cqf0lai7wg5ki7gi2vba5hqk0swhggzplcjwma4wmh9";
|
hash = "sha256-CVZOVOWS0fvfg1yDiWFRa4v4Tpzl8RMVBQ6z0Ib4hfQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -29,40 +32,36 @@ stdenv.mkDerivation rec {
|
||||||
pythonPath = [
|
pythonPath = [
|
||||||
libtorrent
|
libtorrent
|
||||||
] ++ (with python3.pkgs; [
|
] ++ (with python3.pkgs; [
|
||||||
twisted
|
|
||||||
netifaces
|
|
||||||
pycrypto
|
|
||||||
pyasn1
|
|
||||||
requests
|
|
||||||
m2crypto
|
|
||||||
pyqt5
|
|
||||||
chardet
|
|
||||||
cherrypy
|
|
||||||
cryptography
|
|
||||||
libnacl
|
|
||||||
configobj
|
|
||||||
decorator
|
|
||||||
feedparser
|
|
||||||
service-identity
|
|
||||||
psutil
|
|
||||||
pillow
|
|
||||||
networkx
|
|
||||||
pony
|
|
||||||
lz4
|
|
||||||
pyqtgraph
|
|
||||||
pyyaml
|
|
||||||
aiohttp
|
aiohttp
|
||||||
aiohttp-apispec
|
aiohttp-apispec
|
||||||
|
asynctest
|
||||||
|
chardet
|
||||||
|
cherrypy
|
||||||
|
configobj
|
||||||
|
cryptography
|
||||||
|
decorator
|
||||||
faker
|
faker
|
||||||
sentry-sdk
|
feedparser
|
||||||
|
libnacl
|
||||||
|
lz4
|
||||||
|
m2crypto
|
||||||
|
netifaces
|
||||||
|
networkx
|
||||||
|
pillow
|
||||||
|
pony
|
||||||
|
psutil
|
||||||
|
pyasn1
|
||||||
|
pycrypto
|
||||||
|
pyqt5
|
||||||
|
pyqtgraph
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
pytest-timeout
|
pytest-timeout
|
||||||
asynctest
|
pyyaml
|
||||||
|
requests
|
||||||
|
sentry-sdk
|
||||||
|
service-identity
|
||||||
|
twisted
|
||||||
yappi
|
yappi
|
||||||
|
|
||||||
# there is a BTC feature, but it requires some unclear version of
|
|
||||||
# bitcoinlib, so this doesn't work right now.
|
|
||||||
# bitcoinlib
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -84,10 +83,10 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
maintainers = with maintainers; [ xvapx viric ];
|
description = "Decentralised P2P filesharing client based on the Bittorrent protocol";
|
||||||
homepage = "https://www.tribler.org/";
|
homepage = "https://www.tribler.org/";
|
||||||
description = "A completely decentralised P2P filesharing client based on the Bittorrent protocol";
|
license = licenses.lgpl21Plus;
|
||||||
license = licenses.lgpl21;
|
maintainers = with maintainers; [ xvapx viric ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
58
pkgs/development/python-modules/aiohttp-apispec/default.nix
Normal file
58
pkgs/development/python-modules/aiohttp-apispec/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
{ lib
|
||||||
|
, aiohttp
|
||||||
|
, apispec
|
||||||
|
, buildPythonPackage
|
||||||
|
, callPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchPypi
|
||||||
|
, jinja2
|
||||||
|
, packaging
|
||||||
|
, pytest-aiohttp
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, webargs
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "aiohttp-apispec";
|
||||||
|
version = "3.0.0b1";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "maximdanilchenko";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-LGdi5ZhJ1G0GxUJVBZnwW3Q+x3Yo9FRV9b6REPlq7As=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
aiohttp
|
||||||
|
apispec
|
||||||
|
jinja2
|
||||||
|
packaging
|
||||||
|
webargs
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytest-aiohttp
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace requirements.txt \
|
||||||
|
--replace "jinja2<3.0" "jinja2"
|
||||||
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"aiohttp_apispec"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Build and document REST APIs with aiohttp and apispec";
|
||||||
|
homepage = "https://github.com/maximdanilchenko/aiohttp-apispec/";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ viric ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -308,6 +308,8 @@ in {
|
||||||
|
|
||||||
aiohttp = callPackage ../development/python-modules/aiohttp { };
|
aiohttp = callPackage ../development/python-modules/aiohttp { };
|
||||||
|
|
||||||
|
aiohttp-apispec = callPackage ../development/python-modules/aiohttp-apispec { };
|
||||||
|
|
||||||
aiohttp-cors = callPackage ../development/python-modules/aiohttp-cors { };
|
aiohttp-cors = callPackage ../development/python-modules/aiohttp-cors { };
|
||||||
|
|
||||||
aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { };
|
aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { };
|
||||||
|
|
Loading…
Reference in a new issue