mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git
synced 2024-11-23 04:31:26 +00:00
95 lines
2 KiB
Nix
95 lines
2 KiB
Nix
{ nixpkgs ? import <nixpkgs> { }, pythonPkgs ? nixpkgs.pkgs.python39Packages }:
|
|
|
|
let
|
|
inherit (nixpkgs) pkgs;
|
|
inherit pythonPkgs;
|
|
|
|
strawberry-graphql =
|
|
{ buildPythonPackage
|
|
, fetchPypi
|
|
, flask
|
|
, pydantic
|
|
, typing-extensions
|
|
, graphql-core
|
|
, python-multipart
|
|
, python-dateutil
|
|
, pygments
|
|
, poetry
|
|
}:
|
|
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";
|
|
};
|
|
};
|
|
|
|
|
|
selfprivacy-api =
|
|
{ buildPythonPackage
|
|
, fetchPypi
|
|
, flask
|
|
, flask-restful
|
|
, setuptools
|
|
, portalocker
|
|
, flask-swagger
|
|
, flask-swagger-ui
|
|
, pytz
|
|
, pytest
|
|
, pytest-mock
|
|
, pytest-datadir
|
|
, huey
|
|
, gevent
|
|
, mnemonic
|
|
, pydantic
|
|
}:
|
|
buildPythonPackage rec {
|
|
pname = "selfprivacy-api";
|
|
version = "1.2.6";
|
|
src = builtins.fetchGit {
|
|
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
|
|
rev = "c20b0c94f495bb33914aed3f10250ccc5e5128fb";
|
|
ref = "graphql";
|
|
};
|
|
propagatedBuildInputs = [
|
|
flask
|
|
flask-restful
|
|
setuptools
|
|
portalocker
|
|
flask-swagger
|
|
flask-swagger-ui
|
|
pytz
|
|
pytest
|
|
pytest-mock
|
|
pytest-datadir
|
|
huey
|
|
gevent
|
|
mnemonic
|
|
pydantic
|
|
(pythonPkgs.callPackage strawberry-graphql { })
|
|
];
|
|
meta = {
|
|
description = ''
|
|
SelfPrivacy Server Management API
|
|
'';
|
|
};
|
|
};
|
|
drv = pythonPkgs.callPackage selfprivacy-api { };
|
|
in
|
|
if pkgs.lib.inNixShell then drv.env else drv
|