2024-04-21 15:54:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools
|
|
|
|
, argon2-cffi
|
|
|
|
, construct
|
|
|
|
, lxml
|
|
|
|
, pycryptodomex
|
|
|
|
, pyotp
|
|
|
|
, unittestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "pykeepass";
|
|
|
|
version = "4.0.7";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libkeepass";
|
|
|
|
repo = "pykeepass";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-qUNMjnIhQpUSQY0kN9bA4IxQx8fiFIA6p8rPqNqdjNo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/libkeepass/pykeepass/pull/378
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail 'packages = ["pykeepass"]' 'packages = ["pykeepass", "pykeepass.kdbx_parsing"]'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
argon2-cffi
|
|
|
|
construct
|
|
|
|
lxml
|
|
|
|
pycryptodomex
|
|
|
|
setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
propagatedNativeBuildInputs = [ argon2-cffi ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pyotp
|
|
|
|
unittestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [ "pykeepass" ];
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/libkeepass/pykeepass";
|
2022-06-16 17:23:12 +00:00
|
|
|
changelog = "https://github.com/libkeepass/pykeepass/blob/${src.rev}/CHANGELOG.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python library to interact with keepass databases (supports KDBX3 and KDBX4)";
|
2021-05-03 20:48:10 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|