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

79 lines
1.8 KiB
Nix
Raw Normal View History

2021-11-17 12:42:28 +00:00
{ nixpkgs ? import <nixpkgs> { }, pythonPkgs ? nixpkgs.pkgs.python39Packages }:
let
inherit (nixpkgs) pkgs;
inherit pythonPkgs;
2022-01-26 15:06:43 +00:00
selfprivacy-api =
{ buildPythonPackage
, flask
, flask-restful
, setuptools
, portalocker
, flask-swagger
, flask-swagger-ui
, pytz
, pytest
, pytest-mock
, pytest-datadir
, huey
, gevent
, mnemonic
2022-06-24 13:37:00 +00:00
, pydantic
, typing-extensions
2022-01-26 15:06:43 +00:00
}:
2021-11-17 12:42:28 +00:00
buildPythonPackage rec {
pname = "selfprivacy-api";
2022-05-26 15:45:07 +00:00
version = "1.2.6";
2021-11-17 12:42:28 +00:00
src = builtins.fetchGit {
2021-11-17 17:29:10 +00:00
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
2022-06-24 13:17:30 +00:00
rev = "c20b0c94f495bb33914aed3f10250ccc5e5128fb";
2022-06-24 13:06:48 +00:00
ref = "graphql";
2021-11-17 12:42:28 +00:00
};
2022-01-26 15:06:43 +00:00
propagatedBuildInputs = [
flask
flask-restful
setuptools
portalocker
flask-swagger
flask-swagger-ui
pytz
pytest
pytest-mock
pytest-datadir
huey
gevent
mnemonic
2022-06-24 13:55:15 +00:00
(buildPythonPackage rec {
pname = "strawberry-graphql";
version = "0.114.5";
format = "pyproject";
patches = [
./strawberry-graphql.patch
];
propagatedBuildInputs = [
typing-extensions
graphql-core
python-multipart
python-dateutil
flask
pydantic
pygments
poetry
];
src = fetchPypi {
inherit pname version;
sha256 = "b6e007281cf29a66eeba66a512744853d8aa53b4ca2525befb6f350bb7b24df6";
};
})
2022-01-26 15:06:43 +00:00
];
2021-11-17 12:42:28 +00:00
meta = {
description = ''
SelfPrivacy Server Management API
'';
};
};
drv = pythonPkgs.callPackage selfprivacy-api { };
in
if pkgs.lib.inNixShell then drv.env else drv