2022-12-05 21:10:25 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitLab
|
2023-09-11 10:40:39 +00:00
|
|
|
, fetchPypi
|
2021-07-24 20:24:34 +00:00
|
|
|
, apksigner
|
2023-09-11 10:40:39 +00:00
|
|
|
, buildPythonApplication
|
|
|
|
, python3
|
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, androguard
|
|
|
|
, babel
|
|
|
|
, clint
|
|
|
|
, defusedxml
|
|
|
|
, gitpython
|
|
|
|
, libcloud
|
|
|
|
, mwclient
|
|
|
|
, paramiko
|
|
|
|
, pillow
|
|
|
|
, pyasn1
|
|
|
|
, pyasn1-modules
|
|
|
|
, python-vagrant
|
|
|
|
, pyyaml
|
|
|
|
, qrcode
|
|
|
|
, requests
|
|
|
|
, ruamel-yaml
|
|
|
|
, yamllint
|
2021-07-24 20:24:34 +00:00
|
|
|
}:
|
2019-01-28 14:51:17 +00:00
|
|
|
|
2023-09-11 10:40:39 +00:00
|
|
|
buildPythonApplication rec {
|
2019-01-28 14:51:17 +00:00
|
|
|
pname = "fdroidserver";
|
2023-05-16 07:40:36 +00:00
|
|
|
version = "2.2.1";
|
|
|
|
format = "setuptools";
|
2019-01-28 14:51:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "fdroid";
|
|
|
|
repo = "fdroidserver";
|
2023-05-16 07:35:21 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-16 07:40:36 +00:00
|
|
|
sha256 = "sha256-+Y1YTgELsX834WIrhx/NX34yLMHdkKM+YUNvnHPiC/s=";
|
2019-01-28 14:51:17 +00:00
|
|
|
};
|
|
|
|
|
2023-05-16 07:40:36 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"pyasn1"
|
|
|
|
"pyasn1-modules"
|
|
|
|
];
|
|
|
|
|
2021-07-22 11:35:20 +00:00
|
|
|
postPatch = ''
|
2022-12-05 21:10:25 +00:00
|
|
|
substituteInPlace fdroidserver/common.py \
|
|
|
|
--replace "FDROID_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))" "FDROID_PATH = '$out/bin'"
|
2019-01-28 14:51:17 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
2023-09-11 10:40:39 +00:00
|
|
|
${python3.pythonForBuild.interpreter} setup.py compile_catalog
|
2019-01-28 14:51:17 +00:00
|
|
|
'';
|
2022-12-05 21:10:25 +00:00
|
|
|
|
2019-01-28 14:51:17 +00:00
|
|
|
postInstall = ''
|
2019-10-23 17:09:33 +00:00
|
|
|
patchShebangs gradlew-fdroid
|
2019-01-28 14:51:17 +00:00
|
|
|
install -m 0755 gradlew-fdroid $out/bin
|
|
|
|
'';
|
|
|
|
|
2023-09-11 10:40:39 +00:00
|
|
|
nativeBuildInputs = [
|
2023-05-16 07:40:36 +00:00
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
2023-09-11 10:40:39 +00:00
|
|
|
buildInputs = [
|
2022-12-05 21:10:25 +00:00
|
|
|
babel
|
|
|
|
];
|
2019-01-28 14:51:17 +00:00
|
|
|
|
2023-09-11 10:40:39 +00:00
|
|
|
propagatedBuildInputs = [
|
2019-01-28 14:51:17 +00:00
|
|
|
androguard
|
|
|
|
clint
|
|
|
|
defusedxml
|
2022-12-05 21:10:25 +00:00
|
|
|
gitpython
|
2019-01-28 14:51:17 +00:00
|
|
|
libcloud
|
|
|
|
mwclient
|
|
|
|
paramiko
|
|
|
|
pillow
|
|
|
|
pyasn1
|
|
|
|
pyasn1-modules
|
|
|
|
python-vagrant
|
|
|
|
pyyaml
|
|
|
|
qrcode
|
|
|
|
requests
|
2023-09-11 10:41:08 +00:00
|
|
|
(ruamel-yaml.overrideAttrs (old: {
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "ruamel.yaml";
|
|
|
|
version = "0.17.21";
|
|
|
|
hash = "sha256-i3zml6LyEnUqNcGsQURx3BbEJMlXO+SSa1b/P10jt68=";
|
|
|
|
};
|
|
|
|
}))
|
2021-07-22 11:35:20 +00:00
|
|
|
yamllint
|
2019-01-28 14:51:17 +00:00
|
|
|
];
|
|
|
|
|
2023-05-16 07:40:36 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix"
|
|
|
|
"PATH"
|
|
|
|
":"
|
|
|
|
"${lib.makeBinPath [ apksigner ]}"
|
|
|
|
];
|
2021-07-24 20:24:34 +00:00
|
|
|
|
2021-01-31 21:54:50 +00:00
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-05-16 07:35:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"fdroidserver"
|
|
|
|
];
|
2021-07-22 11:35:20 +00:00
|
|
|
|
2019-01-28 14:51:17 +00:00
|
|
|
meta = with lib; {
|
2023-05-16 07:35:21 +00:00
|
|
|
homepage = "https://github.com/f-droid/fdroidserver";
|
|
|
|
changelog = "https://github.com/f-droid/fdroidserver/blob/${version}/CHANGELOG.md";
|
2019-01-28 14:51:17 +00:00
|
|
|
description = "Server and tools for F-Droid, the Free Software repository system for Android";
|
2023-05-16 07:35:21 +00:00
|
|
|
license = licenses.agpl3Plus;
|
2023-09-11 17:36:07 +00:00
|
|
|
maintainers = with maintainers; [ linsui jugendhacker ];
|
2019-01-28 14:51:17 +00:00
|
|
|
};
|
|
|
|
}
|