Merge pull request #31573 from c0bw3b/pkg/pkcs11

opencryptoki, pkcs11-helper, simple-tpm-pk11
This commit is contained in:
Renaud 2017-11-20 22:40:58 +01:00 committed by GitHub
commit 1d6f3ea265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 35 deletions

View File

@ -2,20 +2,22 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "pkcs11-helper-${version}"; name = "pkcs11-helper-${version}";
version = "1.21"; version = "1.22";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "OpenSC"; owner = "OpenSC";
repo = "pkcs11-helper"; repo = "pkcs11-helper";
rev = "${name}"; rev = "${name}";
sha256 = "17a2cssycl7fh44xikmhszigx57vvn0h2sjsnmsy3772kfj796b1"; sha256 = "01v3zv6sr5phqhr2f21fl2rmcnmkp9518dkq82g1v2y9ysjksg7q";
}; };
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ openssl ]; buildInputs = [ openssl ];
enableParallelBuilding = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.opensc-project.org/opensc/wiki/pkcs11-helper; homepage = https://github.com/OpenSC/pkcs11-helper;
license = with licenses; [ bsd3 gpl2 ]; license = with licenses; [ bsd3 gpl2 ];
description = "Library that simplifies the interaction with PKCS#11 providers"; description = "Library that simplifies the interaction with PKCS#11 providers";
platforms = platforms.unix; platforms = platforms.unix;

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;
}; };
} }

View File

@ -1,17 +1,20 @@
{ stdenv, fetchgit, trousers, openssl, opencryptoki, automake, autoconf, libtool }: { stdenv, fetchFromGitHub, trousers, openssl, opencryptoki, autoreconfHook, libtool }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "simple-tpm-pk11-2016-07-12"; name = "simple-tpm-pk11-${version}";
version = "0.06";
src = fetchgit { src = fetchFromGitHub {
url = "https://github.com/ThomasHabets/simple-tpm-pk11"; owner = "ThomasHabets";
rev = "6f1f7a6b96ac82965e977cfecb88d930f1d70243"; repo = "simple-tpm-pk11";
sha256 = "06vf3djp29slh7hrh4hlh3npyl277fy7d77jv9mxa1sk1idjklxc"; rev = version;
sha256 = "0vpbaklr4r1a2am0pqcm6m41ph22mkcrq33y8ab5h8qkhkvhd6a6";
}; };
buildInputs = [ trousers openssl opencryptoki automake autoconf libtool ]; nativeBuildInputs = [ autoreconfHook libtool ];
buildInputs = [ trousers openssl opencryptoki ];
preConfigure = "sh bootstrap.sh"; enableParallelBuilding = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Simple PKCS11 provider for TPM chips"; description = "Simple PKCS11 provider for TPM chips";
@ -19,9 +22,8 @@ stdenv.mkDerivation rec {
A simple library for using the TPM chip to secure SSH keys. A simple library for using the TPM chip to secure SSH keys.
''; '';
homepage = https://github.com/ThomasHabets/simple-tpm-pk11; homepage = https://github.com/ThomasHabets/simple-tpm-pk11;
license = stdenv.lib.licenses.asl20; license = licenses.asl20;
maintainers = with stdenv.lib; [ maintainers.tstrobel ]; maintainers = with maintainers; [ tstrobel ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }