nixpkgs/pkgs/by-name/ic/icloudpd/package.nix

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

93 lines
2.0 KiB
Nix
Raw Normal View History

2024-10-26 16:58:42 +00:00
{
lib,
python3Packages,
fetchFromGitHub,
nix-update-script,
testers,
icloudpd,
2024-01-13 02:37:39 +00:00
}:
python3Packages.buildPythonApplication rec {
pname = "icloudpd";
2024-11-19 09:07:24 +00:00
version = "1.24.4";
2024-01-13 02:37:39 +00:00
pyproject = true;
src = fetchFromGitHub {
owner = "icloud-photos-downloader";
repo = "icloud_photos_downloader";
rev = "v${version}";
2024-11-19 09:07:24 +00:00
hash = "sha256-/axw1RSfQX9RIoICs2Zcn9ScWTcqU9mHAhotaMduAp8=";
2024-01-13 02:37:39 +00:00
};
pythonRelaxDeps = true;
dependencies = with python3Packages; [
2024-01-13 02:37:39 +00:00
certifi
click
flask
2024-01-13 02:37:39 +00:00
keyring
keyrings-alt
piexif
python-dateutil
pytz
requests
schema
six
srp
tqdm
2024-05-24 08:39:45 +00:00
typing-extensions
tzlocal
urllib3
2024-10-26 16:58:16 +00:00
waitress
wheel
2024-01-13 02:37:39 +00:00
];
build-system = with python3Packages; [ setuptools ];
2024-01-13 02:37:39 +00:00
nativeCheckInputs = with python3Packages; [
freezegun
mock
2024-01-13 02:37:39 +00:00
pytest-timeout
pytestCheckHook
vcrpy
2024-01-13 02:37:39 +00:00
];
disabledTests = [
# touches network
"test_autodelete_photos"
"test_download_autodelete_photos"
"test_retry_delete_after_download_session_error"
"test_retry_fail_delete_after_download_session_error"
"test_retry_delete_after_download_internal_error"
"test_autodelete_photos_dry_run"
"test_retry_fail_delete_after_download_internal_error"
"test_autodelete_invalid_creation_date"
2024-10-26 16:58:16 +00:00
"test_folder_structure_de_posix"
2024-01-13 02:37:39 +00:00
];
passthru = {
updateScript = nix-update-script { };
tests = testers.testVersion { package = icloudpd; };
};
preBuild = ''
substituteInPlace pyproject.toml \
2024-11-05 09:32:14 +00:00
--replace-fail "setuptools==69.0.2" "setuptools" \
--replace-fail "wheel==0.42.0" "wheel"
substituteInPlace src/foundation/__init__.py \
--replace-fail "0.0.1" "${version}"
2024-01-13 02:37:39 +00:00
'';
meta = with lib; {
homepage = "https://github.com/icloud-photos-downloader/icloud_photos_downloader";
description = "iCloud Photos Downloader";
license = licenses.mit;
mainProgram = "icloudpd";
2024-10-26 16:58:42 +00:00
maintainers = with maintainers; [
anpin
jnsgruk
];
2024-01-13 02:37:39 +00:00
};
}