2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitLab,
|
|
|
|
pythonOlder,
|
|
|
|
docutils,
|
|
|
|
installShellFiles,
|
|
|
|
poetry-core,
|
|
|
|
google-api-python-client,
|
|
|
|
simplejson,
|
|
|
|
oauth2client,
|
|
|
|
setuptools,
|
|
|
|
pyxdg,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "goobook";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "3.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "goobook";
|
|
|
|
repo = "goobook";
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-gWmeRlte+lP7VP9gbPuMHwhVkx91wQ0GpQFQRLJ29h8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'setuptools = "^62.6.0"' 'setuptools = "*"' \
|
|
|
|
--replace 'google-api-python-client = "^1.7.12"' 'google-api-python-client = "*"' \
|
|
|
|
--replace 'pyxdg = "^0.28"' 'pyxdg = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
docutils
|
|
|
|
installShellFiles
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
google-api-python-client
|
|
|
|
simplejson
|
|
|
|
oauth2client
|
|
|
|
setuptools
|
|
|
|
pyxdg
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
postInstall = ''
|
|
|
|
rst2man goobook.1.rst goobook.1
|
|
|
|
installManPage goobook.1
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
# has no tests
|
2020-12-03 08:41:04 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "goobook" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Access your Google contacts from the command line";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "goobook";
|
2020-09-25 04:45:31 +00:00
|
|
|
longDescription = ''
|
|
|
|
The purpose of GooBook is to make it possible to use your Google Contacts
|
|
|
|
from the command-line and from MUAs such as Mutt.
|
|
|
|
It can be used from Mutt the same way as abook.
|
|
|
|
'';
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://pypi.org/project/goobook/";
|
|
|
|
changelog = "https://gitlab.com/goobook/goobook/-/blob/${version}/CHANGES.rst";
|
|
|
|
license = licenses.gpl3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
}
|