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