jitterentropy: init at 2.1.2

This commit is contained in:
Daniel Schaefer 2018-10-23 23:36:57 +02:00
parent 5c249a3245
commit 8ada6f6c46
3 changed files with 37 additions and 1 deletions

View file

@ -0,0 +1,30 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "jitterentropy-${version}";
version = "2.1.2";
src = fetchFromGitHub {
owner = "smuellerDD";
repo = "jitterentropy-library";
rev = "v${version}";
sha256 = "10yl1hi0hysr53wzy2i8brs0qqnxh46mz3dcjh5mk0ad03wvbfsl";
};
enableParallelBuilding = true;
preInstall = ''
mkdir -p $out/include
'';
installFlags = [
"PREFIX=$(out)"
];
meta = {
description = "Provides a noise source using the CPU execution timing jitter";
homepage = https://github.com/smuellerDD/jitterentropy-library;
license = with stdenv.lib.licenses; [ gpl2 bsd3 ];
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ johnazoidberg ];
};
}

View file

@ -5,6 +5,9 @@
, curl ? null, libxml2 ? null, openssl ? null, withNistBeacon ? false
# Systems that support RDRAND but not AES-NI require libgcrypt to use RDRAND as an entropy source
, libgcrypt ? null, withGcrypt ? true
# Not sure if jitterentropy is safe to use for cryptography
# and thus a default entropy source
, jitterentropy ? null, withJitterEntropy ? false
}:
with stdenv.lib;
stdenv.mkDerivation rec {
@ -23,11 +26,12 @@ stdenv.mkDerivation rec {
preConfigure = "./autogen.sh";
configureFlags =
[ "--disable-jitterentropy" ]
optional (!withJitterEntropy) "--disable-jitterentropy"
++ optional (!withNistBeacon) "--without-nistbeacon"
++ optional (!withGcrypt) "--without-libgcrypt";
buildInputs = [ sysfsutils ]
++ optional withJitterEntropy [ jitterentropy ]
++ optional withGcrypt [ libgcrypt.dev ]
++ optional withNistBeacon [ openssl.dev curl.dev libxml2.dev ];

View file

@ -3459,6 +3459,8 @@ with pkgs;
jira-cli = callPackage ../development/tools/jira_cli { };
jitterentropy = callPackage ../development/libraries/jitterentropy { };
jl = haskellPackages.callPackage ../development/tools/jl { };
jmespath = callPackage ../development/tools/jmespath { };