try patching seahub's manage.py to discover all modules

This commit is contained in:
Trolli Schmittlauch 2019-10-21 22:37:05 +02:00
parent fb48e3c568
commit 17341f5312
2 changed files with 9 additions and 2 deletions

View file

@ -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;
};
}

View file

@ -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
}