2021-01-18 10:52:46 +01:00
|
|
|
{ lib, stdenv, python3, fetchFromGitHub }:
|
2020-11-27 23:12:41 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
py = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
django = super.django_3;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with py.pkgs;
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "etebase-server";
|
2022-03-28 20:29:41 +02:00
|
|
|
version = "0.8.3";
|
2020-11-27 23:12:41 +01:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "etesync";
|
|
|
|
repo = "server";
|
|
|
|
rev = "v${version}";
|
2022-03-28 20:29:41 +02:00
|
|
|
sha256 = "sha256-rPs34uzb5veiOw74SACLrDm4Io0CYH9EL9IuV38CkPY=";
|
2020-11-27 23:12:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./secret.patch ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
|
|
|
asgiref
|
|
|
|
cffi
|
|
|
|
django
|
|
|
|
django-cors-headers
|
|
|
|
djangorestframework
|
|
|
|
drf-nested-routers
|
2022-03-28 20:29:41 +02:00
|
|
|
fastapi
|
2020-11-27 23:12:41 +01:00
|
|
|
msgpack
|
|
|
|
psycopg2
|
|
|
|
pycparser
|
|
|
|
pynacl
|
|
|
|
pytz
|
|
|
|
six
|
|
|
|
sqlparse
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|