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