diff --git a/seafile-server/default.nix b/seafile-server/default.nix index 7b32c23..f5aba5d 100644 --- a/seafile-server/default.nix +++ b/seafile-server/default.nix @@ -67,6 +67,13 @@ let nativeBuildInputs = [ autoconf automake libtool pkgconfig vala autoreconfHook which pythonPackages.wrapPython ]; buildInputs = [ sqlite glib python libuuid openssl oniguruma fuse libarchive libevent libevhtp ]; propagatedBuildInputs = [ libsearpc ] ++ seahubPythonDependencies; + # copy manual to required location + postInstall = '' + mkdir $out/doc + cp ${src}/doc/*.doc $out/doc/ + ''; + # prevent doc directory from being moved to share in fixupPhase + forceShare = [ "man" "info" ]; postFixup = '' buildPythonPath $propagatedBuildInputs wrapPythonProgramsIn "$out/bin" "$out $pythonPath" @@ -123,12 +130,21 @@ stdenv.mkDerivation { buildInputs = [ seahub seafile-server-core libsearpc ] ++ lib.optional withMysql libmysqlclient; phases = [ "installPhase" "fixupPhase" "distPhase" ]; - # todo: create data directory in /srv in activation script + # create required directory structure + # Which files need to be copied is specified in the function `copy_scripts_and_libs` + # of ${seafile-server-core.src}/scripts/build/build-server.py + # The install script below has been hand crafted from that list of files and needs to be updated on new releases. installPhase = '' mkdir "$out" cd "$out" ln -s ${seahub} seahub - ln -s ${seafile-server-core} seafile-server-latest + ln -s ${seafile-server-core} seafile-server + # copy general scripts + cp ${seafile-server-core.src}/scripts/{setup-seafile.sh,setup-seafile-mysql.sh,setup-seafile-mysql.py,seafile.sh,seahub.sh,reset-admin.sh,seaf-fuse.sh,check_init_admin.py,seaf-gc.sh,seaf-fsck.sh} . + # copy update scripts (and their sql) + cp -r ${seafile-server-core.src}/scripts/upgrade . + cp -r ${seafile-server-core.src}/scripts/sql . + # copy_user_manual is already done in the postInstall hook of seafile-server-core ''; meta = with lib; { maintainers = with maintainers; [ schmittlauch ];