1{ fetchFromGitLab
2, python
3, lib
4, apksigner
5}:
6
7python.pkgs.buildPythonApplication rec {
8 version = "2.1.1";
9 pname = "fdroidserver";
10
11 src = fetchFromGitLab {
12 owner = "fdroid";
13 repo = "fdroidserver";
14 rev = version;
15 sha256 = "0qg4vxjcgm05dqk3kyj8lry9wh5bxy0qwz70fiyxb5bi1kwai9ss";
16 };
17
18 postPatch = ''
19 substituteInPlace fdroidserver/common.py --replace "FDROID_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))" "FDROID_PATH = '$out/bin'"
20 '';
21
22 preConfigure = ''
23 ${python.interpreter} setup.py compile_catalog
24 '';
25 postInstall = ''
26 patchShebangs gradlew-fdroid
27 install -m 0755 gradlew-fdroid $out/bin
28 '';
29
30 buildInputs = [ python.pkgs.babel ];
31
32 propagatedBuildInputs = with python.pkgs; [
33 androguard
34 clint
35 defusedxml
36 GitPython
37 libcloud
38 mwclient
39 paramiko
40 pillow
41 pyasn1
42 pyasn1-modules
43 python-vagrant
44 pyyaml
45 qrcode
46 requests
47 ruamel-yaml
48 yamllint
49 ];
50
51 makeWrapperArgs = [ "--prefix" "PATH" ":" "${lib.makeBinPath [ apksigner ]}" ];
52
53 # no tests
54 doCheck = false;
55
56 pythonImportsCheck = [ "fdroidserver" ];
57
58 meta = with lib; {
59 homepage = "https://f-droid.org";
60 description = "Server and tools for F-Droid, the Free Software repository system for Android";
61 license = licenses.agpl3;
62 maintainers = [ lib.maintainers.obfusk ];
63 };
64
65}