2023-01-04 09:41:25 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2024-01-23 21:43:49 +00:00
|
|
|
, python3
|
2024-07-15 10:53:23 +01:00
|
|
|
, withLdap ? false
|
2023-01-04 09:41:25 +00:00
|
|
|
, withPostgres ? true
|
2023-05-13 22:56:30 +01:00
|
|
|
, nix-update-script
|
2024-01-23 21:43:49 +00:00
|
|
|
, nixosTests
|
2023-01-04 09:41:25 +00:00
|
|
|
}:
|
2020-11-27 22:12:41 +00:00
|
|
|
|
2024-08-28 10:25:48 +01:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-11-27 22:12:41 +00:00
|
|
|
pname = "etebase-server";
|
2024-08-28 10:25:48 +01:00
|
|
|
version = "0.14.2";
|
2020-11-27 22:12:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "etesync";
|
|
|
|
repo = "server";
|
2024-06-03 18:58:32 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-08-28 10:25:48 +01:00
|
|
|
hash = "sha256-W2u/d8X8luOzgy1CLNgujnwaoO1pR1QO1Ma7i4CGkdU=";
|
2020-11-27 22:12:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./secret.patch ];
|
|
|
|
|
2024-03-01 21:55:27 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2024-08-28 10:25:48 +01:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2022-04-27 22:12:01 +01:00
|
|
|
aiofiles
|
2024-06-03 18:58:32 +01:00
|
|
|
django_4
|
2022-03-28 19:29:41 +01:00
|
|
|
fastapi
|
2020-11-27 22:12:41 +00:00
|
|
|
msgpack
|
|
|
|
pynacl
|
2022-10-15 16:32:49 +01:00
|
|
|
redis
|
2024-03-01 21:54:41 +00:00
|
|
|
uvicorn
|
|
|
|
websockets
|
|
|
|
watchfiles
|
|
|
|
uvloop
|
|
|
|
pyyaml
|
|
|
|
python-dotenv
|
|
|
|
httptools
|
2022-04-27 22:12:01 +01: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
|
|
|
|
2024-03-01 21:55:27 +00:00
|
|
|
postInstall = ''
|
2020-11-27 22:12:41 +00:00
|
|
|
mkdir -p $out/bin $out/lib
|
2024-03-01 21:55:27 +00:00
|
|
|
cp manage.py $out/bin/etebase-server
|
2020-11-27 22:12:41 +00:00
|
|
|
wrapProgram $out/bin/etebase-server --prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
chmod +x $out/bin/etebase-server
|
|
|
|
'';
|
|
|
|
|
2023-05-13 22:56:30 +01:00
|
|
|
passthru.updateScript = nix-update-script {};
|
2024-08-28 10:25:48 +01:00
|
|
|
passthru.python = python3;
|
2024-03-01 21:55:27 +00:00
|
|
|
# PYTHONPATH of all dependencies used by the package
|
2024-08-28 10:25:48 +01:00
|
|
|
passthru.pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs;
|
2024-01-23 21:43:49 +00:00
|
|
|
passthru.tests = {
|
|
|
|
nixosTest = nixosTests.etebase-server;
|
|
|
|
};
|
2023-05-13 22:56:30 +01:00
|
|
|
|
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 = "Etebase (EteSync 2.0) server so you can run your own";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "etebase-server";
|
2023-01-04 09:41:25 +00:00
|
|
|
changelog = "https://github.com/etesync/server/blob/${version}/ChangeLog.md";
|
2020-11-27 22:12:41 +00:00
|
|
|
license = licenses.agpl3Only;
|
2024-01-23 22:05:11 +00:00
|
|
|
maintainers = with maintainers; [ felschr phaer ];
|
2020-11-27 22:12:41 +00:00
|
|
|
};
|
|
|
|
}
|