git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.fastapi: init at 0.33.0
commit124fb417fcc89f2787510c30d07fb0fff4407ccf authorDaniel Wheeler <daniel.wheeler2@gmail.com> dateFri 26 Jul 2019, 12:15 (7 years ago) parentf878d34
3 files changed+54
pkgs/development/python-modules/fastapi/default.nix+40 pkgs/development/python-modules/fastapi/setup.py.patch+13 pkgs/top-level/python-packages.nix+1
pkgs/development/python-modules/fastapi/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, uvicorn
5+, starlette
6+, pydantic
7+, python
8+, isPy3k
9+, which
10+}:
11+
12+buildPythonPackage rec {
13+ pname = "fastapi";
14+ version = "0.33.0";
15+ disabled = !isPy3k;
16+
17+ src = fetchPypi {
18+ inherit pname version;
19+ sha256 = "1mc8ljfk6xyn2cq725s8hgapp62z5mylzw9akvkhwwz3bh8m5a7f";
20+ };
21+
22+ propagatedBuildInputs = [
23+ uvicorn
24+ starlette
25+ pydantic
26+ ];
27+
28+ patches = [ ./setup.py.patch ];
29+
30+ checkPhase = ''
31+ ${python.interpreter} -c "from fastapi import FastAPI; app = FastAPI()"
32+ '';
33+
34+ meta = with lib; {
35+ homepage = "https://github.com/tiangolo/fastapi";
36+ description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production";
37+ license = licenses.mit;
38+ maintainers = with maintainers; [ wd15 ];
39+ };
40+}
pkgs/development/python-modules/fastapi/setup.py.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/setup.py b/setup.py
2+index ccc3d2b..77ce446 100644
3+--- a/setup.py
4++++ b/setup.py
5+@@ -10,7 +10,7 @@ package_data = \
6+ {'': ['*']}
7+
8+ install_requires = \
9+-['starlette >=0.11.1,<=0.12.0', 'pydantic >=0.30,<=0.30.0']
10++['starlette >=0.11.1', 'pydantic >=0.30']
11+
12+ extras_require = \
13+ {'all': ['requests',
pkgs/top-level/python-packages.nix+1
@@ -6045,6 +6045,7 @@ in {
60456045
60466046 pydantic = callPackage ../development/python-modules/pydantic { };
60476047
6048+ fastapi = callPackage ../development/python-modules/fastapi { };
60486049});
60496050
60506051in fix' (extends overrides packages)