depot/third_party/nixpkgs/pkgs/by-name/fd/fdroidserver/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

112 lines
2.3 KiB
Nix

{
lib,
fetchFromGitLab,
python3Packages,
python3,
fetchPypi,
apksigner,
installShellFiles,
}:
python3Packages.buildPythonApplication rec {
pname = "fdroidserver";
version = "2.3.5";
pyproject = true;
src = fetchFromGitLab {
owner = "fdroid";
repo = "fdroidserver";
tag = version;
hash = "sha256-ESSjC44tdWpmtB+VhEDnUTQz+ZJVQ4jLBjj+0hMSAQA=";
};
pythonRelaxDeps = [
"androguard"
"pyasn1"
"pyasn1-modules"
];
pythonRemoveDeps = [
"puremagic" # Only used as a fallback when magic is not installed
];
postPatch = ''
substituteInPlace fdroidserver/common.py \
--replace-fail "FDROID_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))" "FDROID_PATH = '$out/bin'"
'';
preConfigure = ''
${python3.pythonOnBuildForHost.interpreter} setup.py compile_catalog
'';
postInstall = ''
patchShebangs gradlew-fdroid
install -m 0755 gradlew-fdroid $out/bin
installShellCompletion --cmd fdroid \
--bash completion/bash-completion
'';
nativeBuildInputs = [ installShellFiles ];
build-system = with python3Packages; [
setuptools
babel
];
dependencies = with python3Packages; [
androguard
biplist
clint
defusedxml
gitpython
libcloud
libvirt
magic
mwclient
oscrypto
paramiko
pillow
platformdirs
pyasn1
pyasn1-modules
pycountry
python-vagrant
pyyaml
qrcode
requests
(ruamel-yaml.overrideAttrs (old: {
src = fetchPypi {
pname = "ruamel.yaml";
version = "0.17.21";
hash = "sha256-i3zml6LyEnUqNcGsQURx3BbEJMlXO+SSa1b/P10jt68=";
};
}))
sdkmanager
yamllint
];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [ apksigner ]}"
];
# no tests
doCheck = false;
pythonImportsCheck = [ "fdroidserver" ];
meta = {
homepage = "https://gitlab.com/fdroid/fdroidserver";
changelog = "https://gitlab.com/fdroid/fdroidserver/-/blob/${version}/CHANGELOG.md";
description = "Server and tools for F-Droid, the Free Software repository system for Android";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [
linsui
jugendhacker
];
mainProgram = "fdroid";
};
}