mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
53 lines
1.0 KiB
Nix
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 ];
|
|
};
|
|
}
|