2022-04-27 21:12:01 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonPackage, aioredis, aiofiles, django_3
|
2022-06-13 19:45:40 +00:00
|
|
|
, fastapi, msgpack, pynacl, typing-extensions
|
|
|
|
, withLdap ? true, ldap }:
|
2020-11-27 22:12:41 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "etebase-server";
|
2022-06-13 19:45:40 +00:00
|
|
|
version = "0.9.1";
|
2022-04-27 21:09:27 +00:00
|
|
|
format = "other";
|
2020-11-27 22:12:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "etesync";
|
|
|
|
repo = "server";
|
|
|
|
rev = "v${version}";
|
2022-06-13 19:45:40 +00:00
|
|
|
sha256 = "sha256-mYXy0N7ohNk3K2XNB6JvULF6lhL5dV8yBvooR6RuV1E=";
|
2020-11-27 22:12:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./secret.patch ];
|
|
|
|
|
2022-04-27 21:12:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aioredis
|
|
|
|
aiofiles
|
|
|
|
django_3
|
2022-03-28 18:29:41 +00:00
|
|
|
fastapi
|
2020-11-27 22:12:41 +00:00
|
|
|
msgpack
|
|
|
|
pynacl
|
2022-04-27 21:12:01 +00:00
|
|
|
typing-extensions
|
2022-06-13 19:45:40 +00:00
|
|
|
] ++ lib.optional withLdap ldap;
|
2020-11-27 22:12:41 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib
|
|
|
|
cp -r . $out/lib/etebase-server
|
|
|
|
ln -s $out/lib/etebase-server/manage.py $out/bin/etebase-server
|
|
|
|
wrapProgram $out/bin/etebase-server --prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
chmod +x $out/bin/etebase-server
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/etesync/server";
|
|
|
|
description = "An Etebase (EteSync 2.0) server so you can run your own.";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ felschr ];
|
|
|
|
};
|
|
|
|
}
|