nixpkgs/pkgs/servers/etebase/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

2023-01-04 10:41:25 +01:00
{ lib
, fetchFromGitHub
, buildPythonPackage
, aiofiles
, django_3
, fastapi
, msgpack
, pynacl
, redis
, typing-extensions
, withLdap ? true
, python-ldap
, withPostgres ? true
, psycopg2
}:
2020-11-27 23:12:41 +01:00
buildPythonPackage rec {
pname = "etebase-server";
2023-01-03 21:27:08 +01:00
version = "0.11.0";
format = "other";
2020-11-27 23:12:41 +01:00
src = fetchFromGitHub {
owner = "etesync";
repo = "server";
2023-01-04 10:41:25 +01:00
rev = "refs/tags/${version}";
hash = "sha256-+MSNX+CFmIQII+SFjM2TQKCgRMOTdsOIVAP8ur4WjQY=";
2020-11-27 23:12:41 +01:00
};
patches = [ ./secret.patch ];
propagatedBuildInputs = [
aiofiles
django_3
2022-03-28 20:29:41 +02:00
fastapi
2020-11-27 23:12:41 +01:00
msgpack
pynacl
2022-10-15 17:32:49 +02:00
redis
typing-extensions
2023-01-04 10:41:25 +01:00
] ++ lib.optional withLdap [
python-ldap
] ++ lib.optional withPostgres [
psycopg2
];
2020-11-27 23:12:41 +01: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";
2023-01-04 10:41:25 +01: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 23:12:41 +01:00
license = licenses.agpl3Only;
maintainers = with maintainers; [ felschr ];
};
}