selfprivacy-nixos-config/api/api-package.nix
2021-11-15 13:02:05 +03:00

25 lines
751 B
Nix

{ nixpkgs ? import <nixpkgs> { }, pythonPkgs ? nixpkgs.pkgs.python39Packages }:
let
inherit (nixpkgs) pkgs;
inherit pythonPkgs;
selfprivacy-api = { buildPythonPackage, flask, flask-restful, setuptools }:
buildPythonPackage rec {
pname = "selfprivacy-api";
version = "1.1";
src = builtins.fetchGit {
url = "https://git.selfprivacy.org/ilchub/selfprivacy-rest-api.git";
rev = "dbb4c1095654bba88d4f0c91b7b195d5262976b6";
};
propagatedBuildInputs = [ flask flask-restful setuptools ];
meta = {
description = ''
SelfPrivacy Server Management API
'';
};
};
drv = pythonPkgs.callPackage selfprivacy-api { };
in
if pkgs.lib.inNixShell then drv.env else drv