depot/third_party/nixpkgs/pkgs/by-name/ic/icloudpd/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

84 lines
1.8 KiB
Nix

{ lib
, python3Packages
, fetchFromGitHub
, nix-update-script
, testers
, icloudpd
}:
python3Packages.buildPythonApplication rec {
pname = "icloudpd";
version = "1.19.1";
pyproject = true;
src = fetchFromGitHub {
owner = "icloud-photos-downloader";
repo = "icloud_photos_downloader";
rev = "v${version}";
hash = "sha256-0DbYbBs/8irj/55+WHyNj+iLWh7KqxReVWfmsWz43Xo=";
};
pythonRelaxDeps = true;
nativeBuildInputs = with python3Packages; [
pythonRelaxDepsHook
];
propagatedBuildInputs = with python3Packages; [
wheel
setuptools
requests
schema
click
python-dateutil
tqdm
piexif
urllib3
six
tzlocal
pytz
certifi
keyring
keyrings-alt
typing-extensions
];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
mock
freezegun
vcrpy
pytest-timeout
];
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"
];
passthru = {
updateScript = nix-update-script { };
tests = testers.testVersion { package = icloudpd; };
};
preBuild = ''
substituteInPlace pyproject.toml \
--replace "setuptools==69.0.2" "setuptools" \
--replace "wheel==0.42.0" "wheel"
'';
meta = with lib; {
homepage = "https://github.com/icloud-photos-downloader/icloud_photos_downloader";
description = "iCloud Photos Downloader";
license = licenses.mit;
mainProgram = "icloudpd";
maintainers = with maintainers; [ anpin Enzime jnsgruk ];
};
}