bump seafile components to version 8.0.0 and fix build
This commit is contained in:
parent
2787280d8c
commit
446a5e2f37
|
@ -1,111 +1,138 @@
|
||||||
{ stdenv, lib, fetchFromGitHub,
|
{ stdenv
|
||||||
autoconf, automake, autoreconfHook, pkgconfig, curl, libevent, glib, libuuid, intltool, sqlite, withMysql ? true, libmysqlclient, libarchive, libtool, jansson, vala, fuse, openssl, libevhtp, libsearpc, which,
|
, lib
|
||||||
# for SeaHub
|
, fetchFromGitHub
|
||||||
python3, python3Packages }:
|
, autoconf
|
||||||
|
, automake
|
||||||
let
|
, autoreconfHook
|
||||||
version = "7.1.1";
|
, pkgconfig
|
||||||
python = python3;
|
, curl
|
||||||
pythonPackages = python3Packages;
|
, libevent
|
||||||
django = pythonPackages.django_1_11;
|
, glib
|
||||||
djangoModules = with pythonPackages; [ django-statici18n django-post_office django-picklefield django-formtools djangorestframework ];
|
, libuuid
|
||||||
seahubPythonDependencies = with pythonPackages; [
|
, intltool
|
||||||
django django-webpack-loader future captcha gunicorn pymysql openpyxl qrcode dateutil requests pillow pyjwt pycryptodome
|
, sqlite
|
||||||
]
|
, withMysql ? true
|
||||||
++ map (p: p.override { django = django; }) djangoModules; # build django modules with required version
|
, libmysqlclient
|
||||||
seafile-server-core = stdenv.mkDerivation rec {
|
, libarchive
|
||||||
name = "seafile-server-core";
|
, libtool
|
||||||
inherit version;
|
, jansson
|
||||||
src = fetchFromGitHub {
|
, vala
|
||||||
owner = "haiwen";
|
, fuse
|
||||||
repo = "seafile-server";
|
, openssl
|
||||||
rev = "v${version}-server";
|
, oniguruma
|
||||||
sha256 = "sha256:1y555nm4ic5mbmi87nlp1j23z13na1afziv847xczq3mkach9vqi";
|
, libevhtp
|
||||||
};
|
, libsearpc
|
||||||
# patch to work with latest, non-vulnerable libevhtp
|
, which
|
||||||
patches = [
|
, # for SeaHub
|
||||||
./recent_libevhtp.patch
|
python3
|
||||||
./django-version.patch
|
, python3Packages
|
||||||
];
|
}:
|
||||||
# `which` is called directly from python during buildPhase, so we need the binary
|
let
|
||||||
nativeBuildInputs = [ autoconf automake libtool pkgconfig vala autoreconfHook which pythonPackages.wrapPython ];
|
version = "8.0.0";
|
||||||
buildInputs = [ sqlite glib python libuuid openssl fuse libarchive ccnet-server libevent libevhtp ];
|
python = python3;
|
||||||
propagatedBuildInputs = [ libsearpc ] ++ seahubPythonDependencies;
|
pythonPackages = python3Packages;
|
||||||
postFixup = ''
|
django = pythonPackages.django;
|
||||||
buildPythonPath $propagatedBuildInputs
|
djangoModules = with pythonPackages; [ django-statici18n django-post_office django-picklefield django-formtools djangorestframework ];
|
||||||
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
seahubPythonDependencies = with pythonPackages; [
|
||||||
'';
|
django
|
||||||
checkPhase = "bash ./run_tests.sh";
|
django-webpack-loader
|
||||||
|
future
|
||||||
meta = with lib; {
|
captcha
|
||||||
license = licenses.agpl3; # with additional OpenSSL linking exception
|
gunicorn
|
||||||
maintainers = with maintainers; [ schmittlauch ];
|
pymysql
|
||||||
};
|
openpyxl
|
||||||
};
|
qrcode
|
||||||
seahub = pythonPackages.buildPythonApplication rec {
|
dateutil
|
||||||
name = "seahub";
|
requests
|
||||||
inherit version;
|
pillow
|
||||||
src = fetchFromGitHub {
|
pyjwt
|
||||||
owner = "haiwen";
|
pycryptodome
|
||||||
repo = "seahub";
|
]
|
||||||
rev = "v${version}-server";
|
++ map (p: p.override { inherit django; }) djangoModules; # build django modules with required version
|
||||||
sha256 = "sha256:1s5yd4w5z31hx3x7cd25zgzv7h2yzbdbryypa9in19akmsmb11fp";
|
seafile-server-core = stdenv.mkDerivation rec {
|
||||||
};
|
name = "seafile-server-core";
|
||||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ];
|
|
||||||
buildInputs = [ python pythonPackages.wrapPython ];
|
|
||||||
propagatedBuildInputs = seahubPythonDependencies ++ [ pythonPackages.seafile-bindings pythonPackages.ccnet-bindings ]; # for `seaserv` module
|
|
||||||
installPhase = ''
|
|
||||||
cp -r ./ $out
|
|
||||||
cd "$out"
|
|
||||||
${python.interpreter} -m compileall ./
|
|
||||||
buildPythonPath $propagatedBuildInputs
|
|
||||||
set -x
|
|
||||||
patchPythonScript manage.py
|
|
||||||
'';
|
|
||||||
meta = with lib; {
|
|
||||||
license = licenses.asl20;
|
|
||||||
maintainers = with maintainers; [ schmittlauch ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
ccnet-server = stdenv.mkDerivation rec {
|
|
||||||
name = "ccnet-server";
|
|
||||||
inherit version;
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "haiwen";
|
|
||||||
repo = "ccnet-server";
|
|
||||||
rev = "v${version}-server";
|
|
||||||
sha256 = "sha256:0hf9mmf019984ybc20zxaqyhcfhhr3k0bjr45pq9d79w16ndnim8";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ vala fuse libsearpc libuuid sqlite openssl libarchive libevent glib python ]
|
|
||||||
++ lib.optional (!withMysql) "--without-mysql";
|
|
||||||
# `which` is called directly from python during buildPhase, so we need the binary
|
|
||||||
nativeBuildInputs = [ autoconf automake libtool pkgconfig autoreconfHook which ];
|
|
||||||
configureFlags = [ "--disable-static" ];
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Internal communication framework and user/group management for Seafile server";
|
|
||||||
license = lib.licenses.agpl3; # with additional OpenSSL linking exception
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
name = "seafile-server";
|
|
||||||
inherit version;
|
inherit version;
|
||||||
|
src = fetchFromGitHub {
|
||||||
buildInputs = [ seahub seafile-server-core ccnet-server libsearpc ]
|
owner = "haiwen";
|
||||||
++ lib.optional withMysql libmysqlclient;
|
repo = "seafile-server";
|
||||||
phases = [ "installPhase" "fixupPhase" "distPhase" ];
|
rev = "v${version}-server";
|
||||||
# todo: create data directory in /srv in activation script
|
sha256 = "0pd1zjsw6lkpxd54ln0dz5r9zx9585nib10kvpl1vgzp61g4d223";
|
||||||
installPhase = ''
|
|
||||||
mkdir "$out"
|
|
||||||
cd "$out"
|
|
||||||
ln -s ${seahub} seahub
|
|
||||||
ln -s ${seafile-server-core} seafile-server-latest
|
|
||||||
'';
|
|
||||||
meta = with lib; {
|
|
||||||
maintainers = with maintainers; [ schmittlauch ];
|
|
||||||
license = licenses.free; # components with different free software licenses are combined
|
|
||||||
};
|
};
|
||||||
inherit ccnet-server seafile-server-core seahub; # for using the path in the NixOS module
|
# patch to work with latest, non-vulnerable libevhtp
|
||||||
|
patches = [
|
||||||
|
./recent_libevhtp.patch
|
||||||
|
./django-version.patch
|
||||||
|
];
|
||||||
|
# `which` is called directly from python during buildPhase, so we need the binary
|
||||||
|
nativeBuildInputs = [ autoconf automake libtool pkgconfig vala autoreconfHook which pythonPackages.wrapPython ];
|
||||||
|
buildInputs = [ sqlite glib python libuuid openssl oniguruma fuse libarchive libevent libevhtp ];
|
||||||
|
propagatedBuildInputs = [ libsearpc ] ++ seahubPythonDependencies;
|
||||||
|
postFixup = ''
|
||||||
|
buildPythonPath $propagatedBuildInputs
|
||||||
|
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
||||||
|
'';
|
||||||
|
checkPhase = "bash ./run_tests.sh";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
license = licenses.agpl3; # with additional OpenSSL linking exception
|
||||||
|
maintainers = with maintainers; [ schmittlauch ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
seahub = pythonPackages.buildPythonApplication rec {
|
||||||
|
name = "seahub";
|
||||||
|
inherit version;
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "haiwen";
|
||||||
|
repo = "seahub";
|
||||||
|
rev = "v${version}-server";
|
||||||
|
sha256 = "0j7g43j7w1zb00pg4aaacdv5ycva3qf561hj9pbwh4709mbiykip";
|
||||||
|
};
|
||||||
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ];
|
||||||
|
buildInputs = [ python pythonPackages.wrapPython ];
|
||||||
|
propagatedBuildInputs = seahubPythonDependencies ++ [ pythonPackages.seafile-bindings ]; # for `seaserv` module
|
||||||
|
installPhase = ''
|
||||||
|
cp -r ./ $out
|
||||||
|
cd "$out"
|
||||||
|
${python.interpreter} -m compileall ./
|
||||||
|
buildPythonPath $propagatedBuildInputs
|
||||||
|
set -x
|
||||||
|
patchPythonScript manage.py
|
||||||
|
'';
|
||||||
|
meta = with lib; {
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ schmittlauch ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ vala fuse libsearpc libuuid sqlite openssl libarchive libevent glib python ]
|
||||||
|
++ lib.optional (!withMysql) "--without-mysql";
|
||||||
|
# `which` is called directly from python during buildPhase, so we need the binary
|
||||||
|
nativeBuildInputs = [ autoconf automake libtool pkgconfig autoreconfHook which ];
|
||||||
|
configureFlags = [ "--disable-static" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Internal communication framework and user/group management for Seafile server";
|
||||||
|
license = lib.licenses.agpl3; # with additional OpenSSL linking exception
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "seafile-server";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
buildInputs = [ seahub seafile-server-core libsearpc ]
|
||||||
|
++ lib.optional withMysql libmysqlclient;
|
||||||
|
phases = [ "installPhase" "fixupPhase" "distPhase" ];
|
||||||
|
# todo: create data directory in /srv in activation script
|
||||||
|
installPhase = ''
|
||||||
|
mkdir "$out"
|
||||||
|
cd "$out"
|
||||||
|
ln -s ${seahub} seahub
|
||||||
|
ln -s ${seafile-server-core} seafile-server-latest
|
||||||
|
'';
|
||||||
|
meta = with lib; {
|
||||||
|
maintainers = with maintainers; [ schmittlauch ];
|
||||||
|
license = licenses.free; # components with different free software licenses are combined
|
||||||
|
};
|
||||||
|
inherit seafile-server-core seahub;# for using the path in the NixOS module
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,29 +101,6 @@ Subject: [PATCH] Update upload-file.c
|
||||||
evhtp_set_regex_cb (htp, "^/upload_progress.*", upload_progress_cb, NULL);
|
evhtp_set_regex_cb (htp, "^/upload_progress.*", upload_progress_cb, NULL);
|
||||||
|
|
||||||
|
|
||||||
From b6c41aae74f1eb285a033125f4a5af578c8efbb6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ultima1252 <ultima1252@gmail.com>
|
|
||||||
Date: Mon, 15 Jan 2018 17:13:57 -0800
|
|
||||||
Subject: [PATCH] Update Makefile.am
|
|
||||||
|
|
||||||
---
|
|
||||||
server/Makefile.am | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/server/Makefile.am b/server/Makefile.am
|
|
||||||
index 2491f5e..dd695bd 100644
|
|
||||||
--- a/server/Makefile.am
|
|
||||||
+++ b/server/Makefile.am
|
|
||||||
@@ -114,7 +114,7 @@ seaf_server_SOURCES = \
|
|
||||||
|
|
||||||
seaf_server_LDADD = @CCNET_LIBS@ \
|
|
||||||
$(top_builddir)/lib/libseafile_common.la \
|
|
||||||
- @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ -levhtp \
|
|
||||||
+ @ONIGURUMA_LIBS@ @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ @LIBEVHTP_LIBS@ \
|
|
||||||
$(top_builddir)/common/cdc/libcdc.la \
|
|
||||||
$(top_builddir)/common/db-wrapper/libdbwrapper.la \
|
|
||||||
@SEARPC_LIBS@ @JANSSON_LIBS@ ${LIB_WS32} @ZLIB_LIBS@ \
|
|
||||||
|
|
||||||
From bb2cd57f39450db39c1b6b222b06ac7987f3cd32 Mon Sep 17 00:00:00 2001
|
From bb2cd57f39450db39c1b6b222b06ac7987f3cd32 Mon Sep 17 00:00:00 2001
|
||||||
From: Ultima1252 <ultima1252@gmail.com>
|
From: Ultima1252 <ultima1252@gmail.com>
|
||||||
Date: Mon, 15 Jan 2018 17:17:27 -0800
|
Date: Mon, 15 Jan 2018 17:17:27 -0800
|
||||||
|
|
Loading…
Reference in a new issue