2017-11-12 22:39:37 +01:00
|
|
|
{ stdenv, fetchFromGitHub, openssl, trousers, autoreconfHook, libtool, bison, flex }:
|
2014-10-14 00:48:23 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "opencryptoki-${version}";
|
2018-02-27 17:45:04 +01:00
|
|
|
version = "3.8.2";
|
2014-10-14 00:48:23 +02:00
|
|
|
|
2017-11-12 22:39:37 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opencryptoki";
|
|
|
|
repo = "opencryptoki";
|
|
|
|
rev = "v${version}";
|
2018-02-27 17:45:04 +01:00
|
|
|
sha256 = "1rf7cmibmx636vzv7p54g212478a8wim2lfjf2861hfd0m96nv4l";
|
2014-10-14 00:48:23 +02:00
|
|
|
};
|
|
|
|
|
2017-11-12 22:39:37 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook libtool bison flex ];
|
|
|
|
buildInputs = [ openssl trousers ];
|
2014-10-14 00:48:23 +02:00
|
|
|
|
2017-11-12 22:39:37 +01: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 00:48:23 +02:00
|
|
|
'';
|
|
|
|
|
2017-11-12 22:39:37 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--prefix=$(out)"
|
|
|
|
"--disable-ccatok"
|
|
|
|
"--disable-icatok"
|
|
|
|
];
|
2014-10-14 00:48:23 +02:00
|
|
|
|
2017-11-12 22:39:37 +01:00
|
|
|
enableParallelBuilding = true;
|
2014-10-14 00:48:23 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "PKCS#11 implementation for Linux";
|
2017-11-12 22:39:37 +01:00
|
|
|
homepage = https://github.com/opencryptoki/opencryptoki;
|
2014-10-14 00:48:23 +02:00
|
|
|
license = licenses.cpl10;
|
|
|
|
maintainers = [ maintainers.tstrobel ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|