2023-01-04 09:41:25 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, aiofiles
|
|
|
|
, django_3
|
|
|
|
, fastapi
|
|
|
|
, msgpack
|
|
|
|
, pynacl
|
|
|
|
, redis
|
|
|
|
, typing-extensions
|
|
|
|
, withLdap ? true
|
|
|
|
, python-ldap
|
|
|
|
, withPostgres ? true
|
|
|
|
, psycopg2
|
2023-05-13 21:56:30 +00:00
|
|
|
, nix-update-script
|
2023-01-04 09:41:25 +00:00
|
|
|
}:
|
2020-11-27 22:12:41 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "etebase-server";
|
2023-01-03 20:27:08 +00:00
|
|
|
version = "0.11.0";
|
2022-04-27 21:09:27 +00:00
|
|
|
format = "other";
|
2020-11-27 22:12:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "etesync";
|
|
|
|
repo = "server";
|
2023-01-04 09:41:25 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-+MSNX+CFmIQII+SFjM2TQKCgRMOTdsOIVAP8ur4WjQY=";
|
2020-11-27 22:12:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./secret.patch ];
|
|
|
|
|
2022-04-27 21:12:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
|
|
|
django_3
|
2022-03-28 18:29:41 +00:00
|
|
|
fastapi
|
2020-11-27 22:12:41 +00:00
|
|
|
msgpack
|
|
|
|
pynacl
|
2022-10-15 15:32:49 +00:00
|
|
|
redis
|
2022-04-27 21:12:01 +00:00
|
|
|
typing-extensions
|
2023-02-04 12:42:28 +00:00
|
|
|
] ++ lib.optional withLdap python-ldap
|
|
|
|
++ lib.optional withPostgres psycopg2;
|
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
|
|
|
|
'';
|
|
|
|
|
2023-05-13 21:56:30 +00:00
|
|
|
passthru.updateScript = nix-update-script {};
|
|
|
|
|
2020-11-27 22:12:41 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/etesync/server";
|
2023-01-04 09:41:25 +00:00
|
|
|
description = "An Etebase (EteSync 2.0) server so you can run your own";
|
|
|
|
changelog = "https://github.com/etesync/server/blob/${version}/ChangeLog.md";
|
2020-11-27 22:12:41 +00:00
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ felschr ];
|
|
|
|
};
|
|
|
|
}
|