Merge pull request #60247 from peterhoeg/f/rng

rng-tools: fix missing opensc reference
This commit is contained in:
Peter Hoeg 2019-04-26 15:56:14 +08:00 committed by GitHub
commit 9d7afd0ea8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@
# Not sure if jitterentropy is safe to use for cryptography # Not sure if jitterentropy is safe to use for cryptography
# and thus a default entropy source # and thus a default entropy source
, jitterentropy ? null, withJitterEntropy ? false , jitterentropy ? null, withJitterEntropy ? false
, libp11 ? null, withPkcs11 ? true , libp11 ? null, opensc ? null, withPkcs11 ? true
}: }:
with stdenv.lib; with stdenv.lib;
@ -26,6 +26,11 @@ stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
cp README.md README cp README.md README
${optionalString withPkcs11 ''
substituteInPlace rngd.c \
--replace /usr/lib64/opensc-pkcs11.so ${opensc}/lib/opensc-pkcs11.so
''}
''; '';
nativeBuildInputs = [ autoreconfHook libtool pkgconfig ]; nativeBuildInputs = [ autoreconfHook libtool pkgconfig ];
@ -40,7 +45,7 @@ stdenv.mkDerivation rec {
buildInputs = [ sysfsutils ] buildInputs = [ sysfsutils ]
++ optionals withGcrypt [ libgcrypt ] ++ optionals withGcrypt [ libgcrypt ]
++ optionals withJitterEntropy [ jitterentropy ] ++ optionals withJitterEntropy [ jitterentropy ]
++ optionals withNistBeacon [ openssl curl libxml2 ] ++ optionals withNistBeacon [ curl libxml2 openssl ]
++ optionals withPkcs11 [ libp11 openssl ]; ++ optionals withPkcs11 [ libp11 openssl ];
# This shouldn't be necessary but is as of 6.7 # This shouldn't be necessary but is as of 6.7