opencryptoki: 3.2 -> 3.8.1

This commit is contained in:
Renaud 2017-11-12 22:39:37 +01:00 committed by GitHub
parent 2d8d35e342
commit f1ec44ec94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,38 +1,41 @@
{ stdenv, fetchurl, openssl, trousers, automake, autoconf, libtool, bison, flex }: { stdenv, fetchFromGitHub, openssl, trousers, autoreconfHook, libtool, bison, flex }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "3.2";
name = "opencryptoki-${version}"; name = "opencryptoki-${version}";
version = "3.8.1";
src = fetchurl { src = fetchFromGitHub {
url = "mirror://sourceforge/opencryptoki/opencryptoki/v${version}/opencryptoki-v${version}.tgz"; owner = "opencryptoki";
sha256 = "06r6zp299vxdspl6k65myzgjv0bihg7kc500v7s4jd3mcrkngd6h"; repo = "opencryptoki";
rev = "v${version}";
sha256 = "1m618pjfzw18irmh6i4pfq1gvcxgyfh9ikjn33nrdj55v2l27g31";
}; };
buildInputs = [ automake autoconf libtool openssl trousers bison flex ]; nativeBuildInputs = [ autoreconfHook libtool bison flex ];
buildInputs = [ openssl trousers ];
preConfigure = '' postPatch = ''
substituteInPlace configure.in --replace "chown" "true" substituteInPlace configure.ac \
substituteInPlace configure.in --replace "chgrp" "true" --replace "usermod" "true" \
sh bootstrap.sh --prefix=$out --replace "groupadd" "true" \
--replace "chmod" "true" \
--replace "chgrp" "true"
substituteInPlace usr/lib/Makefile.am --replace "DESTDIR" "out"
''; '';
configureFlags = [ "--disable-ccatok" "--disable-icatok" ]; configureFlags = [
"--prefix=$(out)"
"--disable-ccatok"
"--disable-icatok"
];
makeFlags = "DESTDIR=$(out)"; enableParallelBuilding = true;
# work around the build script of opencryptoki
postInstall = ''
cp -r $out/$out/* $out
rm -r $out/nix
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "PKCS#11 implementation for Linux"; description = "PKCS#11 implementation for Linux";
homepage = http://opencryptoki.sourceforge.net/; homepage = https://github.com/opencryptoki/opencryptoki;
license = licenses.cpl10; license = licenses.cpl10;
maintainers = [ maintainers.tstrobel ]; maintainers = [ maintainers.tstrobel ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }