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";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "3.2.1";
|
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;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-iTqD/oUQqC7Fju8SEPkSZX7FC9tE4eRCewiJR8STmEw=";
|
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
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
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
|
|
|
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 = ''
|
2024-01-25 14:12:00 +00:00
|
|
|
export PY_IGNORE_IMPORTMISMATCH=1
|
2021-04-12 18:23:04 +00:00
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Google Photos and Albums backup with Google Photos Library API";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gphotos-sync";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|