depot/third_party/nixpkgs/pkgs/tools/security/opencryptoki/default.nix
Default email 686ce24904 Project import generated by Copybara.
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
2023-02-16 18:41:37 +01:00

63 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, bison
, flex
, openldap
, openssl
, trousers
}:
stdenv.mkDerivation rec {
pname = "opencryptoki";
version = "3.19.0";
src = fetchFromGitHub {
owner = "opencryptoki";
repo = "opencryptoki";
rev = "v${version}";
hash = "sha256-ym13I34H3d1JuVBnItkceUbqpjYFhD+mPgWYHPetF7Y=";
};
nativeBuildInputs = [
autoreconfHook
bison
flex
];
buildInputs = [
openldap
openssl
trousers
];
postPatch = ''
substituteInPlace configure.ac \
--replace "usermod" "true" \
--replace "groupadd" "true" \
--replace "chmod" "true" \
--replace "chgrp" "true"
'';
configureFlags = [
"--prefix="
"--disable-ccatok"
"--disable-icatok"
];
enableParallelBuilding = true;
installFlags = [
"DESTDIR=${placeholder "out"}"
];
meta = with lib; {
changelog = "https://github.com/opencryptoki/opencryptoki/blob/${src.rev}/ChangeLog";
description = "PKCS#11 implementation for Linux";
homepage = "https://github.com/opencryptoki/opencryptoki";
license = licenses.cpl10;
maintainers = [ ];
platforms = platforms.unix;
};
}