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

25 lines
955 B
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;
selfprivacy-api = { buildPythonPackage, flask, flask-restful, setuptools, portalocker, flask-swagger, flask-swagger-ui, pytz, pytest, pytest-mock, pytest-datadir, huey, gevent }:
2021-11-17 12:42:28 +00:00
buildPythonPackage rec {
pname = "selfprivacy-api";
2022-01-11 05:43:55 +00:00
version = "1.1.1";
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-01-11 05:43:55 +00:00
rev = "650032bdab5e7fa4556aaed5575a008c9d1db65d";
2021-11-17 12:42:28 +00:00
};
2021-12-13 09:55:02 +00:00
propagatedBuildInputs = [ flask flask-restful setuptools portalocker flask-swagger flask-swagger-ui pytz pytest pytest-mock pytest-datadir huey gevent ];
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