2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2022-06-26 10:26:21 +00:00
|
|
|
, python3
|
2022-04-27 09:35:20 +00:00
|
|
|
, ffmpeg
|
|
|
|
}:
|
2023-05-24 13:37:59 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2021-04-12 18:23:04 +00:00
|
|
|
pname = "gphotos-sync";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "3.1.2";
|
2022-06-26 10:26:21 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gilesknap";
|
|
|
|
repo = "gphotos-sync";
|
|
|
|
rev = version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-lLw450Rk7tIENFTZWHoinkhv3VtctDv18NKxhox+NgI=";
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
patches = [
|
|
|
|
./skip-network-tests.patch
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# Consider fixing this upstream by following up on:
|
|
|
|
# https://github.com/gilesknap/gphotos-sync/issues/441
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "setuptools<57" "setuptools" \
|
|
|
|
--replace "wheel==0.33.1" "wheel"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
setuptools
|
2024-01-02 11:29:13 +00:00
|
|
|
setuptools-scm
|
2023-10-09 19:29:22 +00:00
|
|
|
wheel
|
|
|
|
];
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"psutil"
|
|
|
|
"exif"
|
2023-08-10 07:59:29 +00:00
|
|
|
"pyyaml"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-04-12 18:23:04 +00:00
|
|
|
appdirs
|
|
|
|
attrs
|
|
|
|
exif
|
2022-06-26 10:26:21 +00:00
|
|
|
google-auth-oauthlib
|
2021-04-12 18:23:04 +00:00
|
|
|
psutil
|
|
|
|
pyyaml
|
2023-05-24 13:37:59 +00:00
|
|
|
psutil
|
2022-04-27 09:35:20 +00:00
|
|
|
requests-oauthlib
|
2022-06-26 10:26:21 +00:00
|
|
|
types-pyyaml
|
|
|
|
types-requests
|
2021-04-12 18:23:04 +00:00
|
|
|
];
|
2021-08-11 14:56:57 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
buildInputs = [
|
|
|
|
ffmpeg
|
|
|
|
];
|
2021-08-11 14:56:57 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2021-04-12 18:23:04 +00:00
|
|
|
mock
|
2022-06-26 10:26:21 +00:00
|
|
|
pytestCheckHook
|
2021-04-12 18:23:04 +00:00
|
|
|
];
|
2021-08-11 14:56:57 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
preCheck = ''
|
2021-04-12 18:23:04 +00:00
|
|
|
export HOME=$(mktemp -d)
|
2022-06-26 10:26:21 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=gphotos_sync --cov-report term --cov-report xml:cov.xml" ""
|
2021-04-12 18:23:04 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Google Photos and Albums backup with Google Photos Library API";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/gilesknap/gphotos-sync";
|
2022-06-26 10:26:21 +00:00
|
|
|
license = licenses.asl20;
|
2021-04-12 18:23:04 +00:00
|
|
|
maintainers = with maintainers; [ dnr ];
|
|
|
|
};
|
|
|
|
}
|