nixpkgs/pkgs/tools/security/opencryptoki/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

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