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

54 lines
1.1 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
}:
2021-11-17 12:42:28 +00:00
buildPythonPackage rec {
pname = "selfprivacy-api";
2022-05-12 15:56:45 +00:00
version = "1.2.5";
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-05-12 15:56:45 +00:00
rev = "1ac5f7243312fac899caa53da25d34491790e685";
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
];
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