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