2022-10-30 15:09:59 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonPackage, aiofiles, django_3
|
|
|
|
, fastapi, msgpack, pynacl, redis, typing-extensions
|
2022-11-04 12:27:35 +00:00
|
|
|
, withLdap ? true, python-ldap
|
|
|
|
, withPostgres ? true, psycopg2 }:
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "etebase-server";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "0.10.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "other";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "etesync";
|
|
|
|
repo = "server";
|
|
|
|
rev = "v${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-z6aiXSWdLcDfOpqC5epsclXWxJq59MqWDQOnnFqGwz4=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./secret.patch ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
|
|
|
django_3
|
2022-03-30 09:31:56 +00:00
|
|
|
fastapi
|
2021-02-13 14:23:35 +00:00
|
|
|
msgpack
|
|
|
|
pynacl
|
2022-10-30 15:09:59 +00:00
|
|
|
redis
|
2022-04-27 09:35:20 +00:00
|
|
|
typing-extensions
|
2022-11-04 12:27:35 +00:00
|
|
|
] ++ lib.optional withLdap python-ldap
|
|
|
|
++ lib.optional withPostgres psycopg2;
|
2021-02-13 14:23:35 +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 ];
|
|
|
|
};
|
|
|
|
}
|