1{ lib
2, fetchFromGitLab
3, python
4, apksigner
5}:
6
7python.pkgs.buildPythonApplication rec {
8 pname = "fdroidserver";
9 version = "2.2.1";
10 format = "setuptools";
11
12 src = fetchFromGitLab {
13 owner = "fdroid";
14 repo = "fdroidserver";
15 rev = "refs/tags/${version}";
16 sha256 = "sha256-+Y1YTgELsX834WIrhx/NX34yLMHdkKM+YUNvnHPiC/s=";
17 };
18
19 pythonRelaxDeps = [
20 "pyasn1"
21 "pyasn1-modules"
22 ];
23
24 postPatch = ''
25 substituteInPlace fdroidserver/common.py \
26 --replace "FDROID_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))" "FDROID_PATH = '$out/bin'"
27 '';
28
29 preConfigure = ''
30 ${python.pythonForBuild.interpreter} setup.py compile_catalog
31 '';
32
33 postInstall = ''
34 patchShebangs gradlew-fdroid
35 install -m 0755 gradlew-fdroid $out/bin
36 '';
37
38 nativeBuildInputs = with python.pkgs; [
39 pythonRelaxDepsHook
40 ];
41
42 buildInputs = with python.pkgs; [
43 babel
44 ];
45
46 propagatedBuildInputs = with python.pkgs; [
47 androguard
48 clint
49 defusedxml
50 gitpython
51 libcloud
52 mwclient
53 paramiko
54 pillow
55 pyasn1
56 pyasn1-modules
57 python-vagrant
58 pyyaml
59 qrcode
60 requests
61 ruamel-yaml
62 yamllint
63 ];
64
65 makeWrapperArgs = [
66 "--prefix"
67 "PATH"
68 ":"
69 "${lib.makeBinPath [ apksigner ]}"
70 ];
71
72 # no tests
73 doCheck = false;
74
75 pythonImportsCheck = [
76 "fdroidserver"
77 ];
78
79 meta = with lib; {
80 homepage = "https://github.com/f-droid/fdroidserver";
81 changelog = "https://github.com/f-droid/fdroidserver/blob/${version}/CHANGELOG.md";
82 description = "Server and tools for F-Droid, the Free Software repository system for Android";
83 license = licenses.agpl3Plus;
84 maintainers = with maintainers; [ obfusk ];
85 };
86
87}