nixpkgs/pkgs/development/tools/fdroidserver/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

113 lines
2.1 KiB
Nix
Raw Normal View History

2022-12-05 21:10:25 +00:00
{ lib
, fetchFromGitLab
, fetchPypi
2021-07-24 20:24:34 +00:00
, apksigner
, 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
}:
buildPythonApplication rec {
pname = "fdroidserver";
version = "2.2.1";
format = "setuptools";
src = fetchFromGitLab {
owner = "fdroid";
repo = "fdroidserver";
2023-05-16 07:35:21 +00:00
rev = "refs/tags/${version}";
sha256 = "sha256-+Y1YTgELsX834WIrhx/NX34yLMHdkKM+YUNvnHPiC/s=";
};
pythonRelaxDeps = [
"pyasn1"
"pyasn1-modules"
];
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'"
'';
preConfigure = ''
${python3.pythonForBuild.interpreter} setup.py compile_catalog
'';
2022-12-05 21:10:25 +00:00
postInstall = ''
patchShebangs gradlew-fdroid
install -m 0755 gradlew-fdroid $out/bin
'';
nativeBuildInputs = [
pythonRelaxDepsHook
];
buildInputs = [
2022-12-05 21:10:25 +00:00
babel
];
propagatedBuildInputs = [
androguard
clint
defusedxml
2022-12-05 21:10:25 +00:00
gitpython
libcloud
mwclient
paramiko
pillow
pyasn1
pyasn1-modules
python-vagrant
pyyaml
qrcode
requests
(ruamel-yaml.overrideAttrs (old: {
src = fetchPypi {
pname = "ruamel.yaml";
version = "0.17.21";
hash = "sha256-i3zml6LyEnUqNcGsQURx3BbEJMlXO+SSa1b/P10jt68=";
};
}))
yamllint
];
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"
];
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";
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;
maintainers = with maintainers; [ linsui jugendhacker ];
};
}