depot/third_party/nixpkgs/pkgs/development/python-modules/pykeepass/default.nix
Default email ca5ab3a501 Project import generated by Copybara.
GitOrigin-RevId: 4a01ca36d6bfc133bc617e661916a81327c9bbc8
2022-07-14 08:49:19 -04:00

44 lines
1.1 KiB
Nix

{ lib, fetchFromGitHub, buildPythonPackage
, lxml, pycryptodomex, construct
, argon2-cffi, python-dateutil, future
, python
}:
buildPythonPackage rec {
pname = "pykeepass";
version = "4.0.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "libkeepass";
repo = "pykeepass";
rev = "v${version}";
hash = "sha256-HyveBBsd1OFWoY3PgqqaKRLBhsxgFv8PRAxEF6r+bf4=";
};
postPatch = ''
substituteInPlace setup.py --replace "==" ">="
'';
propagatedBuildInputs = [
lxml pycryptodomex construct
argon2-cffi python-dateutil future
];
propagatedNativeBuildInputs = [ argon2-cffi ];
checkPhase = ''
${python.interpreter} -m unittest tests.tests
'';
pythonImportsCheck = [ "pykeepass" ];
meta = with lib; {
homepage = "https://github.com/libkeepass/pykeepass";
changelog = "https://github.com/libkeepass/pykeepass/blob/${src.rev}/CHANGELOG.rst";
description = "Python library to interact with keepass databases (supports KDBX3 and KDBX4)";
license = licenses.gpl3Only;
maintainers = with maintainers; [ dotlambda ];
};
}