summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2022-01-26 19:35:15 +0100
committerc0bw3b <c0bw3b@users.noreply.github.com>2022-01-26 20:10:34 +0100
commit96e055fba48de677035da731594a38faa7a9e277 (patch)
tree3b1150ed45d92637a390899f1ee88f5f680aeec9
parentba667597dbe6bc7e30c2cc5f80f21f3e3b551553 (diff)
rng-tools: fix path to opensc-pkcs11.so
Changes upstream made the patching on rngd.c irrelevant
-rw-r--r--pkgs/tools/security/rng-tools/default.nix14
1 files changed, 5 insertions, 9 deletions
diff --git a/pkgs/tools/security/rng-tools/default.nix b/pkgs/tools/security/rng-tools/default.nix
index 76aea2bbd514..47bf2c8297f8 100644
--- a/pkgs/tools/security/rng-tools/default.nix
+++ b/pkgs/tools/security/rng-tools/default.nix
@@ -23,13 +23,6 @@ stdenv.mkDerivation rec {
sha256 = "sha256-qheJaeVX2zuv0mvKEd6wcbSHFjiJE0t5hVCJiRSKm3M=";
};
- postPatch = ''
- ${optionalString withPkcs11 ''
- substituteInPlace rngd.c \
- --replace /usr/lib64/opensc-pkcs11.so ${opensc}/lib/opensc-pkcs11.so
- ''}
- '';
-
nativeBuildInputs = [ autoreconfHook libtool pkg-config ];
configureFlags = [
@@ -49,8 +42,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
- # For cross-compilation
- makeFlags = [ "AR:=$(AR)" ];
+ makeFlags = [
+ "AR:=$(AR)" # For cross-compilation
+ ] ++ optionals (withPkcs11) [
+ "PKCS11_ENGINE=${opensc}/lib/opensc-pkcs11.so" # Overrides configure script paths
+ ];
doCheck = true;
preCheck = "patchShebangs tests/*.sh";