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

63 lines
1.4 KiB
Nix
Raw Normal View History

2022-08-12 12:12:02 +00:00
{ nixpkgs ? import <nixpkgs> { }, pythonPkgs ? nixpkgs.pkgs.python39Packages }:
let
inherit (nixpkgs) pkgs;
inherit pythonPkgs;
selfprivacy-graphql-api =
{ 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 13:43:34 +00:00
rev = "43675b2d1d1e8b9ff3a66b47afbb73ff3de63425";
2022-08-12 13:51:36 +00:00
ref = "fastapi";
2022-08-12 12:12:02 +00:00
};
propagatedBuildInputs = [
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
'';
};
2022-08-12 13:43:34 +00:00
passthru = {
2022-08-12 13:49:40 +00:00
pythonPath = pythonPkgs.makePythonPath propagatedBuildInputs;
2022-08-12 13:43:34 +00:00
};
2022-08-12 12:12:02 +00:00
};
drv = pythonPkgs.callPackage selfprivacy-graphql-api { };
in
if pkgs.lib.inNixShell then drv.env else drv