about summary refs log tree commit diff
path: root/pkgs/applications/networking/seahub
diff options
context:
space:
mode:
authorGreizgh <greizgh@ephax.org>2022-01-03 21:17:46 +0100
committerRobert Schütz <github@dotlambda.de>2022-01-30 20:45:56 +0000
commit4094fcb66f551c5eeb56618138149be5adcb5f54 (patch)
tree5b208aaa832cfe31e35fc59c92c0eb3be4ace6b0 /pkgs/applications/networking/seahub
parent86c43007ae3e66d9d44c40d79b85a1fd0a71403e (diff)
seahub: init at 8.0.8
Diffstat (limited to 'pkgs/applications/networking/seahub')
-rw-r--r--pkgs/applications/networking/seahub/default.nix74
1 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/applications/networking/seahub/default.nix b/pkgs/applications/networking/seahub/default.nix
new file mode 100644
index 0000000000000..8c26b72908368
--- /dev/null
+++ b/pkgs/applications/networking/seahub/default.nix
@@ -0,0 +1,74 @@
+{ lib, fetchFromGitHub, python3, makeWrapper }:
+let
+  # Seahub 8.x.x does not support django-webpack-loader >=1.x.x
+  python = python3.override {
+    packageOverrides = self: super: {
+      django-webpack-loader = super.django-webpack-loader.overridePythonAttrs (old: rec {
+        version = "0.7.0";
+        src = old.src.override {
+          inherit version;
+          sha256 = "0izl6bibhz3v538ad5hl13lfr6kvprf62rcl77wq2i5538h8hg3s";
+        };
+      });
+    };
+  };
+in
+python.pkgs.buildPythonApplication rec {
+  pname = "seahub";
+  version = "8.0.8";
+
+  src = fetchFromGitHub {
+    owner = "haiwen";
+    repo = "seahub";
+    rev = "c51346155b2f31e038c3a2a12e69dcc6665502e2"; # using a fixed revision because upstream may re-tag releases :/
+    sha256 = "0dagiifxllfk73xdzfw2g378jccpzplhdrmkwbaakbhgbvvkg92k";
+  };
+
+  dontBuild = true;
+  doCheck = false; # disabled because it requires a ccnet environment
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  propagatedBuildInputs = with python.pkgs; [
+    django
+    future
+    django-statici18n
+    django-webpack-loader
+    django-simple-captcha
+    django-picklefield
+    django-formtools
+    mysqlclient
+    pillow
+    python-dateutil
+    django_compressor
+    djangorestframework
+    openpyxl
+    requests
+    requests_oauthlib
+    pyjwt
+    pycryptodome
+    qrcode
+    pysearpc
+    seaserv
+    gunicorn
+  ];
+
+  installPhase = ''
+    cp -dr --no-preserve='ownership' . $out/
+    wrapProgram $out/manage.py \
+      --prefix PYTHONPATH : "$PYTHONPATH:$out/thirdpart:"
+  '';
+
+  passthru = {
+    inherit python;
+    pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs;
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/haiwen/seahub";
+    description = "The web end of seafile server";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ greizgh schmittlauch ];
+  };
+}