2017-11-13 00:39:37 +03:00
|
|
|
{ stdenv, fetchFromGitHub, openssl, trousers, autoreconfHook, libtool, bison, flex }:
|
2014-10-14 02:48:23 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "opencryptoki";
|
2018-02-27 19:45:04 +03:00
|
|
|
version = "3.8.2";
|
2014-10-14 02:48:23 +04:00
|
|
|
|
2017-11-13 00:39:37 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opencryptoki";
|
|
|
|
repo = "opencryptoki";
|
|
|
|
rev = "v${version}";
|
2018-02-27 19:45:04 +03:00
|
|
|
sha256 = "1rf7cmibmx636vzv7p54g212478a8wim2lfjf2861hfd0m96nv4l";
|
2014-10-14 02:48:23 +04:00
|
|
|
};
|
|
|
|
|
2017-11-13 00:39:37 +03:00
|
|
|
nativeBuildInputs = [ autoreconfHook libtool bison flex ];
|
|
|
|
buildInputs = [ openssl trousers ];
|
2014-10-14 02:48:23 +04:00
|
|
|
|
2017-11-13 00:39:37 +03:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace "usermod" "true" \
|
|
|
|
--replace "groupadd" "true" \
|
|
|
|
--replace "chmod" "true" \
|
|
|
|
--replace "chgrp" "true"
|
|
|
|
substituteInPlace usr/lib/Makefile.am --replace "DESTDIR" "out"
|
2014-10-14 02:48:23 +04:00
|
|
|
'';
|
|
|
|
|
2017-11-13 00:39:37 +03:00
|
|
|
configureFlags = [
|
|
|
|
"--prefix=$(out)"
|
|
|
|
"--disable-ccatok"
|
|
|
|
"--disable-icatok"
|
|
|
|
];
|
2014-10-14 02:48:23 +04:00
|
|
|
|
2017-11-13 00:39:37 +03:00
|
|
|
enableParallelBuilding = true;
|
2014-10-14 02:48:23 +04:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "PKCS#11 implementation for Linux";
|
2017-11-13 00:39:37 +03:00
|
|
|
homepage = https://github.com/opencryptoki/opencryptoki;
|
2014-10-14 02:48:23 +04:00
|
|
|
license = licenses.cpl10;
|
|
|
|
maintainers = [ maintainers.tstrobel ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|