2023-02-16 17:41:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, bison
|
|
|
|
, flex
|
|
|
|
, openldap
|
|
|
|
, openssl
|
|
|
|
, trousers
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "opencryptoki";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "3.20.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opencryptoki";
|
|
|
|
repo = "opencryptoki";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-Z11CDw9ykmJ7MI7I0H4Y/i+8/I+hRgC2frklYPP1di0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openldap
|
|
|
|
openssl
|
|
|
|
trousers
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace "usermod" "true" \
|
|
|
|
--replace "groupadd" "true" \
|
|
|
|
--replace "chmod" "true" \
|
|
|
|
--replace "chgrp" "true"
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
2023-02-16 17:41:37 +00:00
|
|
|
"--prefix="
|
2020-04-24 23:36:52 +00:00
|
|
|
"--disable-ccatok"
|
|
|
|
"--disable-icatok"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
installFlags = [
|
|
|
|
"DESTDIR=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/opencryptoki/opencryptoki/blob/${src.rev}/ChangeLog";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "PKCS#11 implementation for Linux";
|
|
|
|
homepage = "https://github.com/opencryptoki/opencryptoki";
|
|
|
|
license = licenses.cpl10;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|