2023-02-16 17:41:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, bison
|
|
|
|
, flex
|
|
|
|
, openldap
|
|
|
|
, openssl
|
|
|
|
, trousers
|
2024-04-21 15:54:59 +00:00
|
|
|
, libcap
|
2023-02-16 17:41:37 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "opencryptoki";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.23.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opencryptoki";
|
|
|
|
repo = "opencryptoki";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-5FcvwGTzsL0lYrSYGlbSY89s6OKzg+2TRlwHlJjdzXo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openldap
|
|
|
|
openssl
|
|
|
|
trousers
|
2024-04-21 15:54:59 +00:00
|
|
|
libcap
|
2023-02-16 17:41:37 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace configure.ac \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "usermod" "true" \
|
|
|
|
--replace-fail "useradd" "true" \
|
|
|
|
--replace-fail "groupadd" "true" \
|
|
|
|
--replace-fail "chmod" "true" \
|
|
|
|
--replace-fail "chown" "true" \
|
|
|
|
--replace-fail "chgrp" "true"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|