depot/third_party/nixpkgs/pkgs/servers/etebase/default.nix
Default email ca5ab3a501 Project import generated by Copybara.
GitOrigin-RevId: 4a01ca36d6bfc133bc617e661916a81327c9bbc8
2022-07-14 08:49:19 -04:00

43 lines
1.1 KiB
Nix

{ lib, fetchFromGitHub, buildPythonPackage, aioredis, aiofiles, django_3
, fastapi, msgpack, pynacl, typing-extensions
, withLdap ? true, ldap }:
buildPythonPackage rec {
pname = "etebase-server";
version = "0.9.1";
format = "other";
src = fetchFromGitHub {
owner = "etesync";
repo = "server";
rev = "v${version}";
sha256 = "sha256-mYXy0N7ohNk3K2XNB6JvULF6lhL5dV8yBvooR6RuV1E=";
};
patches = [ ./secret.patch ];
propagatedBuildInputs = [
aioredis
aiofiles
django_3
fastapi
msgpack
pynacl
typing-extensions
] ++ lib.optional withLdap ldap;
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 ];
};
}