Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pykeepass / default.nix
blobda2e8d5bc837bf1a399a5967a61e7de788fa13cd
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , setuptools
5 , argon2-cffi
6 , construct
7 , lxml
8 , pycryptodomex
9 , pyotp
10 , unittestCheckHook
13 buildPythonPackage rec {
14   pname = "pykeepass";
15   version = "4.0.7";
16   pyproject = true;
18   src = fetchFromGitHub {
19     owner = "libkeepass";
20     repo = "pykeepass";
21     rev = "v${version}";
22     hash = "sha256-qUNMjnIhQpUSQY0kN9bA4IxQx8fiFIA6p8rPqNqdjNo=";
23   };
25   postPatch = ''
26     # https://github.com/libkeepass/pykeepass/pull/378
27     substituteInPlace pyproject.toml \
28       --replace-fail 'packages = ["pykeepass"]' 'packages = ["pykeepass", "pykeepass.kdbx_parsing"]'
29   '';
31   nativeBuildInputs = [
32     setuptools
33   ];
35   propagatedBuildInputs = [
36     argon2-cffi
37     construct
38     lxml
39     pycryptodomex
40     setuptools
41   ];
43   propagatedNativeBuildInputs = [ argon2-cffi ];
45   nativeCheckInputs = [
46     pyotp
47     unittestCheckHook
48   ];
50   pythonImportsCheck = [ "pykeepass" ];
52   meta = with lib; {
53     homepage = "https://github.com/libkeepass/pykeepass";
54     changelog = "https://github.com/libkeepass/pykeepass/blob/${src.rev}/CHANGELOG.rst";
55     description = "Python library to interact with keepass databases (supports KDBX3 and KDBX4)";
56     license = licenses.gpl3Only;
57     maintainers = with maintainers; [ dotlambda ];
58   };