nixpkgs/pkgs/development/python-modules/pykcs11/default.nix
2024-10-16 16:14:15 +00:00

53 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
callPackage,
fetchPypi,
setuptools,
swig,
}:
buildPythonPackage rec {
pname = "pykcs11";
version = "1.5.17";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-e2Z+lZ+gtq0HULA+IIGgWcvppieJdmFD5Q+QmIoziZQ=";
};
build-system = [ setuptools ];
nativeBuildInputs = [ swig ];
pypaBuildFlags = [ "--skip-dependency-check" ];
outputs = [
"out"
"testout"
];
postInstall = ''
mkdir $testout
cp -R test $testout/test
'';
pythonImportsCheck = [ "PyKCS11" ];
doCheck = false;
# tests complain about circular import, do testing with passthru.tests instead
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
meta = with lib; {
description = "PKCS#11 wrapper for Python";
homepage = "https://github.com/LudovicRousseau/PyKCS11";
changelog = "https://github.com/LudovicRousseau/PyKCS11/releases/tag/${version}";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ hulr ];
};
}