1{ lib, fetchFromGitHub, buildPythonPackage
2, lxml, pycryptodomex, construct
3, argon2_cffi, dateutil, future
4, python
5}:
6
7buildPythonPackage rec {
8 pname = "pykeepass";
9 version = "4.0.0";
10
11 src = fetchFromGitHub {
12 owner = "libkeepass";
13 repo = "pykeepass";
14 rev = version;
15 sha256 = "1zw5hjk90zfxpgq2fz4h5qzw3kmvdnlfbd32gw57l034hmz2i08v";
16 };
17
18 postPatch = ''
19 substituteInPlace setup.py --replace "==" ">="
20 '';
21
22 propagatedBuildInputs = [
23 lxml pycryptodomex construct
24 argon2_cffi dateutil future
25 ];
26
27 checkPhase = ''
28 ${python.interpreter} -m unittest tests.tests
29 '';
30
31 meta = with lib; {
32 homepage = "https://github.com/libkeepass/pykeepass";
33 changelog = "https://github.com/libkeepass/pykeepass/blob/${version}/CHANGELOG.rst";
34 description = "Python library to interact with keepass databases (supports KDBX3 and KDBX4)";
35 license = licenses.gpl3Only;
36 maintainers = with maintainers; [ dotlambda ];
37 };
38}