nixpkgs/pkgs/tools/backup/gphotos-sync/default.nix

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

63 lines
1.1 KiB
Nix
Raw Normal View History

2022-02-25 14:58:24 +00:00
{ lib
, fetchFromGitHub
2022-06-06 00:21:01 +01:00
, python3
2022-02-25 14:58:24 +00:00
, ffmpeg
}:
2023-05-12 15:17:03 +01:00
python3.pkgs.buildPythonApplication rec {
2021-03-17 00:12:17 +00:00
pname = "gphotos-sync";
2024-01-18 16:46:00 +00:00
version = "3.2.1";
2022-06-06 00:21:01 +01:00
format = "pyproject";
2021-03-17 00:12:17 +00:00
src = fetchFromGitHub {
owner = "gilesknap";
repo = "gphotos-sync";
rev = version;
2024-01-18 16:46:00 +00:00
hash = "sha256-iTqD/oUQqC7Fju8SEPkSZX7FC9tE4eRCewiJR8STmEw=";
2021-03-17 00:12:17 +00:00
};
2022-06-06 00:21:01 +01:00
patches = [
./skip-network-tests.patch
];
2023-08-26 08:45:47 +01:00
nativeBuildInputs = with python3.pkgs; [
setuptools
setuptools-scm
2023-08-26 08:45:47 +01:00
wheel
];
2023-08-05 22:01:48 +01:00
2023-05-12 15:17:03 +01:00
propagatedBuildInputs = with python3.pkgs; [
2021-03-17 00:12:17 +00:00
appdirs
attrs
exif
2022-06-06 00:21:01 +01:00
google-auth-oauthlib
2021-03-17 00:12:17 +00:00
psutil
pyyaml
2023-05-12 15:17:03 +01:00
psutil
2022-02-25 14:58:24 +00:00
requests-oauthlib
2022-06-06 00:21:01 +01:00
types-pyyaml
types-requests
2021-03-17 00:12:17 +00:00
];
2021-07-25 19:56:50 +01:00
2022-02-25 14:58:24 +00:00
buildInputs = [
ffmpeg
];
2021-07-25 19:56:50 +01:00
2023-05-12 15:17:03 +01:00
nativeCheckInputs = with python3.pkgs; [
2021-03-17 00:12:17 +00:00
mock
2022-06-06 00:21:01 +01:00
pytestCheckHook
2021-03-17 00:12:17 +00:00
];
2021-07-25 19:56:50 +01:00
2022-06-06 00:21:01 +01:00
preCheck = ''
2024-01-18 16:46:00 +00:00
export PY_IGNORE_IMPORTMISMATCH=1
2021-03-17 00:12:17 +00:00
export HOME=$(mktemp -d)
'';
meta = with lib; {
description = "Google Photos and Albums backup with Google Photos Library API";
mainProgram = "gphotos-sync";
2022-02-25 14:58:24 +00:00
homepage = "https://github.com/gilesknap/gphotos-sync";
2022-06-06 00:21:01 +01:00
license = licenses.asl20;
2021-03-17 00:12:17 +00:00
maintainers = with maintainers; [ dnr ];
};
}