git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #60142 from peterhoeg/u/rng

rng-tools: 6.6 -> 6.7 and libp11: 0.4.9 -> 0.4.10

commit1011fae581e1139ea4c9f3e479d604eb5669c5d9 authorPeter Hoeg <peter@hoeg.com> dateThu 25 Apr 2019, 13:19 (8 years ago) parente89fc19c9b0c68
2 files changed+36−19
pkgs/development/libraries/libp11/default.nix+9−3 pkgs/tools/security/rng-tools/default.nix+27−16
pkgs/development/libraries/libp11/default.nix+9−3
@@ -1,4 +1,5 @@
1−{ stdenv, fetchFromGitHub, autoreconfHook, libtool, openssl, pkgconfig }:
1+{ stdenv, fetchFromGitHub, autoreconfHook, libtool, pkgconfig
2+, openssl }:
23
34stdenv.mkDerivation rec {
45 name = "libp11-${version}";
@@ -11,15 +12,20 @@ stdenv.mkDerivation rec {
1112 sha256 = "1m4aw45bqichhx7cn78d8l1r1v0ccvwzlfj09fay2l9rfic5jgfz";
1213 };
1314
14− makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
15+ configureFlags = [
16+ "--with-enginesdir=${placeholder "out"}/lib/engines"
17+ ];
1518
1619 nativeBuildInputs = [ autoreconfHook pkgconfig libtool ];
20+
1721 buildInputs = [ openssl ];
1822
23+ enableParallelBuilding = true;
24+
1925 meta = with stdenv.lib; {
26+ description = "Small layer on top of PKCS#11 API to make PKCS#11 implementations easier";
2027 homepage = https://github.com/OpenSC/libp11;
2128 license = licenses.lgpl21Plus;
22− description = "Small layer on top of PKCS#11 API to make PKCS#11 implementations easier";
2329 platforms = platforms.all;
2430 };
2531}
pkgs/tools/security/rng-tools/default.nix+27−16
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, libtool, autoconf, automake, pkgconfig
1+{ stdenv, fetchFromGitHub, libtool, autoreconfHook, pkgconfig
22, sysfsutils
33 # WARNING: DO NOT USE BEACON GENERATED VALUES AS SECRET CRYPTOGRAPHIC KEYS
44 # https://www.nist.gov/programs-projects/nist-randomness-beacon
@@ -8,32 +8,43 @@
88 # Not sure if jitterentropy is safe to use for cryptography
99 # and thus a default entropy source
1010, jitterentropy ? null, withJitterEntropy ? false
11+, libp11 ? null, withPkcs11 ? true
1112}:
13+
1214with stdenv.lib;
15+
1316stdenv.mkDerivation rec {
14− name = "rng-tools-${version}";
15− version = "6.6";
17+ pname = "rng-tools";
18+ version = "6.7";
1619
1720 src = fetchFromGitHub {
1821 owner = "nhorman";
1922 repo = "rng-tools";
2023 rev = "v${version}";
21− sha256 = "0c32sxfvngdjzfmxn5ngc5yxwi8ij3yl216nhzyz9r31qi3m14v7";
24+ sha256 = "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5";
2225 };
2326
24− nativeBuildInputs = [ libtool autoconf automake pkgconfig ];
27+ postPatch = ''
28+ cp README.md README
29+ '';
2530
26− preConfigure = "./autogen.sh";
31+ nativeBuildInputs = [ autoreconfHook libtool pkgconfig ];
2732
28− configureFlags =
29− optional (!withJitterEntropy) "--disable-jitterentropy"
30− ++ optional (!withNistBeacon) "--without-nistbeacon"
31− ++ optional (!withGcrypt) "--without-libgcrypt";
33+ configureFlags = [
34+ (withFeature withGcrypt "libgcrypt")
35+ (enableFeature withJitterEntropy "jitterentropy")
36+ (withFeature withNistBeacon "nistbeacon")
37+ (withFeature withPkcs11 "pkcs11")
38+ ];
3239
3340 buildInputs = [ sysfsutils ]
34− ++ optional withJitterEntropy [ jitterentropy ]
35− ++ optional withGcrypt [ libgcrypt.dev ]
36− ++ optional withNistBeacon [ openssl.dev curl.dev libxml2.dev ];
41+ ++ optionals withGcrypt [ libgcrypt ]
42+ ++ optionals withJitterEntropy [ jitterentropy ]
43+ ++ optionals withNistBeacon [ openssl curl libxml2 ]
44+ ++ optionals withPkcs11 [ libp11 openssl ];
45+
46+ # This shouldn't be necessary but is as of 6.7
47+ NIX_LDFLAGS = optionalString withPkcs11 "-lcrypto";
3748
3849 enableParallelBuilding = true;
3950
@@ -43,8 +54,8 @@ stdenv.mkDerivation rec {
4354 meta = {
4455 description = "A random number generator daemon";
4556 homepage = https://github.com/nhorman/rng-tools;
46− license = stdenv.lib.licenses.gpl2Plus;
47− platforms = stdenv.lib.platforms.linux;
48− maintainers = with stdenv.lib.maintainers; [ johnazoidberg ];
57+ license = licenses.gpl2Plus;
58+ platforms = platforms.linux;
59+ maintainers = with maintainers; [ johnazoidberg ];
4960 };
5061}