diff options
author | Daniel Schaefer <git@danielschaefer.me> | 2018-10-22 23:48:25 +0200 |
---|---|---|
committer | Daniel Schaefer <git@danielschaefer.me> | 2018-10-23 23:36:31 +0200 |
commit | 5c249a3245912a27d82e292917d0a3dd0a90cbba (patch) | |
tree | cfa2262ee1c5b189f58a046d41a0014d69830818 /pkgs/tools | |
parent | 516681c8726018fecd0e31ae755cb9a9c01a75e5 (diff) | |
download | nixlib-5c249a3245912a27d82e292917d0a3dd0a90cbba.tar nixlib-5c249a3245912a27d82e292917d0a3dd0a90cbba.tar.gz nixlib-5c249a3245912a27d82e292917d0a3dd0a90cbba.tar.bz2 nixlib-5c249a3245912a27d82e292917d0a3dd0a90cbba.tar.lz nixlib-5c249a3245912a27d82e292917d0a3dd0a90cbba.tar.xz nixlib-5c249a3245912a27d82e292917d0a3dd0a90cbba.tar.zst nixlib-5c249a3245912a27d82e292917d0a3dd0a90cbba.zip |
rng-tools: 5 -> 6.6
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/security/rng-tools/default.nix | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/pkgs/tools/security/rng-tools/default.nix b/pkgs/tools/security/rng-tools/default.nix index d2326c7e8c38..3a6c1cecdf18 100644 --- a/pkgs/tools/security/rng-tools/default.nix +++ b/pkgs/tools/security/rng-tools/default.nix @@ -1,24 +1,46 @@ -{ stdenv, fetchurl }: - +{ stdenv, fetchFromGitHub, libtool, autoconf, automake, pkgconfig +, sysfsutils + # WARNING: DO NOT USE BEACON GENERATED VALUES AS SECRET CRYPTOGRAPHIC KEYS + # https://www.nist.gov/programs-projects/nist-randomness-beacon +, 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 +}: +with stdenv.lib; stdenv.mkDerivation rec { - name = "rng-tools-5"; + name = "rng-tools-${version}"; + version = "6.6"; + + src = fetchFromGitHub { + owner = "nhorman"; + repo = "rng-tools"; + rev = "v${version}"; + sha256 = "0c32sxfvngdjzfmxn5ngc5yxwi8ij3yl216nhzyz9r31qi3m14v7"; + }; - src = fetchurl { - url = "mirror://sourceforge/gkernel/${name}.tar.gz"; + nativeBuildInputs = [ libtool autoconf automake pkgconfig ]; - sha256 = "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"; - }; + preConfigure = "./autogen.sh"; + + configureFlags = + [ "--disable-jitterentropy" ] + ++ optional (!withNistBeacon) "--without-nistbeacon" + ++ optional (!withGcrypt) "--without-libgcrypt"; + + buildInputs = [ sysfsutils ] + ++ optional withGcrypt [ libgcrypt.dev ] + ++ optional withNistBeacon [ openssl.dev curl.dev libxml2.dev ]; + + enableParallelBuilding = true; # For cross-compilation makeFlags = [ "AR:=$(AR)" ]; meta = { description = "A random number generator daemon"; - - homepage = https://sourceforge.net/projects/gkernel; - - license = stdenv.lib.licenses.gpl2; - + homepage = https://github.com/nhorman/rng-tools; + license = stdenv.lib.licenses.gpl2Plus; platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ johnazoidberg ]; }; } |