selfprivacy-nix-repo/pkgs/selfprivacy-graphql-api/default.nix

60 lines
1.3 KiB
Nix
Raw Normal View History

2022-08-12 17:35:42 +00:00
{ nixpkgs ? import <nixpkgs> { }, pythonPkgs ? nixpkgs.pkgs.python39Packages }:
2022-08-12 12:12:02 +00:00
let
2022-08-12 17:35:42 +00:00
inherit (nixpkgs) pkgs;
inherit pythonPkgs;
2022-08-12 12:12:02 +00:00
selfprivacy-graphql-api =
2022-08-12 17:35:42 +00:00
{ buildPythonPackage
, fetchPypi
, setuptools
, portalocker
, pytz
, pytest
, pytest-mock
, pytest-datadir
, huey
, gevent
, mnemonic
, pydantic
, typing-extensions
, strawberry_graphql
, psutil
, fastapi
, uvicorn
}:
2022-08-12 13:48:24 +00:00
pythonPkgs.buildPythonApplication rec {
2022-08-12 12:12:02 +00:00
pname = "selfprivacy-graphql-api";
version = "2.0.0";
src = builtins.fetchGit {
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
2022-08-12 22:18:25 +00:00
rev = "f750056ad802abb212fe3d21464a5aaf2699ad79";
2022-08-12 13:51:36 +00:00
ref = "fastapi";
2022-08-12 12:12:02 +00:00
};
2022-08-12 17:35:42 +00:00
propagatedBuildInputs = [
2022-08-12 12:12:02 +00:00
setuptools
portalocker
pytz
pytest
pytest-mock
pytest-datadir
huey
gevent
mnemonic
pydantic
typing-extensions
strawberry_graphql
psutil
fastapi
uvicorn
];
meta = {
description = ''
SelfPrivacy Server Management API
'';
};
};
drv = pythonPkgs.callPackage selfprivacy-graphql-api { };
in
2022-08-12 17:35:42 +00:00
if pkgs.lib.inNixShell then drv.env else drv