From 17341f5312f818230345f70ad488c518f9dd01b9 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Mon, 21 Oct 2019 22:37:05 +0200 Subject: [PATCH] try patching seahub's manage.py to discover all modules --- default.nix | 2 ++ seafile-server/default.nix | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 8c94652..c223113 100644 --- a/default.nix +++ b/default.nix @@ -7,5 +7,7 @@ self: super: rec { jsonfield = super.python27Packages.callPackage ./jsonfield/default.nix {}; django-post_office = super.python27Packages.callPackage ./django-post_office/default.nix { inherit jsonfield; }; django-statici18n = super.python27Packages.callPackage ./django-statici18n/default.nix {}; + seafile-bindings = super.python27Packages.toPythonModule seafile-server.seafile-server-core; + ccnet-bindings = super.python27Packages.toPythonModule seafile-server.ccnet-server; }; } diff --git a/seafile-server/default.nix b/seafile-server/default.nix index 39f88e0..2fc1a80 100644 --- a/seafile-server/default.nix +++ b/seafile-server/default.nix @@ -51,10 +51,15 @@ sha256 = "sha256:04wy0cj76j8kwgnx6iqja5gpc3q661lcy64qpqf3bzi907bad6xp"; }; 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 + patchPythonScript manage.py ''; - propagatedBuildInputs = seahubPythonDependencies; meta = with lib; { license = licenses.asl20; maintainers = with maintainers; [ schmittlauch ]; @@ -116,5 +121,5 @@ maintainers = with maintainers; [ schmittlauch ]; license = licenses.free; # components with different free software licenses are combined }; - inherit ccnet-server seafile-server-core; # for using the path in the NixOS module + inherit ccnet-server seafile-server-core seahub; # for using the path in the NixOS module }