initial commit

This commit is contained in:
Trolli Schmittlauch 2019-10-09 00:53:54 +02:00
commit 1a8a6b7927
6 changed files with 175 additions and 0 deletions

9
default.nix Normal file
View file

@ -0,0 +1,9 @@
self: super: rec {
libevhtp = super.callPackage ./libevhtp/default.nix {};
seafile-server = super.callPackage ./seafile-server/default.nix { inherit libevhtp python27Packages;};
python27Packages = super.python27Packages // rec {
django-jsonfield = super.python27Packages.callPackage ./django-jsonfield/default.nix {};
jsonfield = super.python27Packages.callPackage ./jsonfield/default.nix {};
django-post_office = super.python27Packages.callPackage ./django-post_office/default.nix { inherit jsonfield; };
};
}

View file

@ -0,0 +1,23 @@
{ lib, buildPythonPackage, fetchFromGitHub,
django, jsonfield, tox}:
buildPythonPackage rec {
pname = "django-post_office";
version = "3.2.1";
src = fetchFromGitHub {
owner = "ui";
repo = pname;
rev = "v${version}";
sha256 = "sha256:12ccqa3168n0s8mqgywbg87qk72yh9salqxafcq4nc4lc3mcsmyj";
};
propagatedBuildInputs = [ django jsonfield ];
checkInputs = [ tox django jsonfield ];
checkPhase = ''
django-admin.py test post_office --settings=post_office.test_settings --pythonpath=.
'';
meta = {
description = "A Django app to monitor and send mail asynchronously, complete with template support.";
maintainers = with lib.maintainers; [ schmittlauch ];
license = lib.licenses.mit;
};
}

View file

@ -0,0 +1,17 @@
{ lib, buildPythonPackage, fetchPypi,
django, django_appconf, six}:
buildPythonPackage rec {
pname = "django-statici18n";
version = "1.8.3";
src = fetchPypi {
inherit pname version;
sha256 = "0dgpnnxazrgfc7jd6ldvdwpyhh0fywviywfwnjgglwkphgaflamr";
};
propagatedBuildInputs = [ django django_appconf six ];
meta = {
description = "A Django app that provides helper for generating Javascript catalog to static files.";
maintainers = with lib.maintainers; [ schmittlauch ];
license = lib.licenses.bsd3;
};
}

17
jsonfield/default.nix Normal file
View file

@ -0,0 +1,17 @@
{ lib, buildPythonPackage, fetchPypi,
django }:
buildPythonPackage rec {
pname = "jsonfield";
version = "2.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "0d5qmjja31rgcj524qy8x527fx81dj1cpvys68f3bmnna14cvcdy";
};
propagatedBuildInputs = [ django ];
meta = {
description = "A reusable Django field that allows you to store validated JSON in your model.";
maintainers = with lib.maintainers; [ schmittlauch ];
license = lib.licenses.mit;
};
}

27
libevhtp/default.nix Normal file
View file

@ -0,0 +1,27 @@
{ stdenv, fetchFromGitHub, lib,
cmake,
libevent,
# optional:
openssl, pth, oniguruma
}:
stdenv.mkDerivation rec {
name = "libevhtp";
version = "1.2.15";
src = fetchFromGitHub {
owner = "ellzey";
repo = "libevhtp";
rev = version;
sha256 = "01c4l77arph8qyrhak4ik6kf60wb5msymqmfl4w7gzmgns2n0p89";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libevent openssl pth oniguruma ];
meta = {
description = "Create extremely-fast and secure embedded HTTP servers with ease.";
homepage = "https://github.com/ellzey/libevhtp";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ schmittlauch ];
};
}

View file

@ -0,0 +1,82 @@
{ stdenv, lib, fetchFromGitHub,
autoconf, automake, autoreconfHook, pkgconfig, curl, libevent, glib, libuuid, intltool, sqlite, withMysql ? true, libmysql, libarchive, libtool, jansson, vala, fuse, openssl, libevhtp, ccnet, libsearpc,
# for SeaHub
python27, python27Packages }:
let
version = "7.1.0";
seafile-server-core = stdenv.mkDerivation rec {
name = "seafile-server-core";
inherit version;
src = fetchFromGitHub {
owner = "haiwen";
repo = "seafile-server";
rev = "v${version}-server";
sha256 = "sha256:0r3vw145vzhbipwk4cyj1h7sb3szy5hcp36n3pf2jxpwy365ir92";
};
nativeBuildInputs = [ autoconf automake libtool pkgconfig autoreconfHook ];
buildInputs = [ sqlite glib python27 libuuid openssl ];
checkPhase = "bash ./run_tests.sh";
};
seahub = python27Packages.buildPythonApplication rec {
name = "seahub";
inherit version;
src = fetchFromGitHub {
owner = "haiwen";
repo = "seahub";
rev = "v${version}-server";
sha256 = "1l4rmkdh0mcxjmm5fiz3frqm4wyq4pbdg9pwmb82f1q64ph9pjy2";
};
phases = [ "installPhase" "fixupPhase" "distPhase" ];
installPhase = ''
find ./
'';
};
propagatedBuildInputs = with python27Packages; [
django pytz django-statici18n djangorestframework django_compressor
django-post_office django-constance gunicorn flup chardet dateutil six
openpyxl
];
django-constance = python27.buildPythonPackage rec {
pname = "django-constance";
version = "1.0.1";
src = fetchFromGitHub {
owner = "haiwen";
repo = pname;
rev = "bde7f7c";
sha256 = "sha256:12ccqa3168n0s8mqgywbg87qk72yh9salqxafcq4nc4lc3mcsmxx";
};
meta = {
license = lib.licenses.bsd3;
};
};
ccnet-server = stdenv.mkDerivation rec {
name = "ccnet-server";
inherit version;
src = fetchFromGitHub {
owner = "haiwen";
repo = "ccnet-server";
rev = "v${version}-server";
sha256 = "sha256:0yfq8fvz17l0295kkpj95f33gwm31ikyhymxq4fy088q608vd8g5";
};
buildInputs = [ vala libsearpc ]
++ lib.optional (!withMysql) "--without-mysql";
nativeBuildInputs = [ autoconf automake libtool ];
preConfigure = "bash autogen.sh";
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 ccnet-server libsearpc ]
++ lib.optional withMysql libmysql;
phases = [ "installPhase" "fixupPhase" "distPhase" ];
# todo: create data directory in /srv in activation script
}