Merge pull request #60142 from peterhoeg/u/rng
rng-tools: 6.6 -> 6.7 and libp11: 0.4.9 -> 0.4.10
This commit is contained in:
commit
1011fae581
@ -1,4 +1,5 @@
|
|||||||
{ stdenv, fetchFromGitHub, autoreconfHook, libtool, openssl, pkgconfig }:
|
{ stdenv, fetchFromGitHub, autoreconfHook, libtool, pkgconfig
|
||||||
|
, openssl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libp11-${version}";
|
name = "libp11-${version}";
|
||||||
@ -11,15 +12,20 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1m4aw45bqichhx7cn78d8l1r1v0ccvwzlfj09fay2l9rfic5jgfz";
|
sha256 = "1m4aw45bqichhx7cn78d8l1r1v0ccvwzlfj09fay2l9rfic5jgfz";
|
||||||
};
|
};
|
||||||
|
|
||||||
makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
|
configureFlags = [
|
||||||
|
"--with-enginesdir=${placeholder "out"}/lib/engines"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkgconfig libtool ];
|
nativeBuildInputs = [ autoreconfHook pkgconfig libtool ];
|
||||||
|
|
||||||
buildInputs = [ openssl ];
|
buildInputs = [ openssl ];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
description = "Small layer on top of PKCS#11 API to make PKCS#11 implementations easier";
|
||||||
homepage = https://github.com/OpenSC/libp11;
|
homepage = https://github.com/OpenSC/libp11;
|
||||||
license = licenses.lgpl21Plus;
|
license = licenses.lgpl21Plus;
|
||||||
description = "Small layer on top of PKCS#11 API to make PKCS#11 implementations easier";
|
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, libtool, autoconf, automake, pkgconfig
|
{ stdenv, fetchFromGitHub, libtool, autoreconfHook, pkgconfig
|
||||||
, sysfsutils
|
, sysfsutils
|
||||||
# WARNING: DO NOT USE BEACON GENERATED VALUES AS SECRET CRYPTOGRAPHIC KEYS
|
# WARNING: DO NOT USE BEACON GENERATED VALUES AS SECRET CRYPTOGRAPHIC KEYS
|
||||||
# https://www.nist.gov/programs-projects/nist-randomness-beacon
|
# https://www.nist.gov/programs-projects/nist-randomness-beacon
|
||||||
@ -8,32 +8,43 @@
|
|||||||
# 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
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "rng-tools-${version}";
|
pname = "rng-tools";
|
||||||
version = "6.6";
|
version = "6.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nhorman";
|
owner = "nhorman";
|
||||||
repo = "rng-tools";
|
repo = "rng-tools";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0c32sxfvngdjzfmxn5ngc5yxwi8ij3yl216nhzyz9r31qi3m14v7";
|
sha256 = "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ libtool autoconf automake pkgconfig ];
|
postPatch = ''
|
||||||
|
cp README.md README
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = "./autogen.sh";
|
nativeBuildInputs = [ autoreconfHook libtool pkgconfig ];
|
||||||
|
|
||||||
configureFlags =
|
configureFlags = [
|
||||||
optional (!withJitterEntropy) "--disable-jitterentropy"
|
(withFeature withGcrypt "libgcrypt")
|
||||||
++ optional (!withNistBeacon) "--without-nistbeacon"
|
(enableFeature withJitterEntropy "jitterentropy")
|
||||||
++ optional (!withGcrypt) "--without-libgcrypt";
|
(withFeature withNistBeacon "nistbeacon")
|
||||||
|
(withFeature withPkcs11 "pkcs11")
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ sysfsutils ]
|
buildInputs = [ sysfsutils ]
|
||||||
++ optional withJitterEntropy [ jitterentropy ]
|
++ optionals withGcrypt [ libgcrypt ]
|
||||||
++ optional withGcrypt [ libgcrypt.dev ]
|
++ optionals withJitterEntropy [ jitterentropy ]
|
||||||
++ optional withNistBeacon [ openssl.dev curl.dev libxml2.dev ];
|
++ optionals withNistBeacon [ openssl curl libxml2 ]
|
||||||
|
++ optionals withPkcs11 [ libp11 openssl ];
|
||||||
|
|
||||||
|
# This shouldn't be necessary but is as of 6.7
|
||||||
|
NIX_LDFLAGS = optionalString withPkcs11 "-lcrypto";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
@ -43,8 +54,8 @@ stdenv.mkDerivation rec {
|
|||||||
meta = {
|
meta = {
|
||||||
description = "A random number generator daemon";
|
description = "A random number generator daemon";
|
||||||
homepage = https://github.com/nhorman/rng-tools;
|
homepage = https://github.com/nhorman/rng-tools;
|
||||||
license = stdenv.lib.licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with stdenv.lib.maintainers; [ johnazoidberg ];
|
maintainers = with maintainers; [ johnazoidberg ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user