From 8524b11d557f17e66cd629b1f77527facd7abdf4 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 16 Oct 2021 09:27:42 -0700 Subject: [PATCH] ibm-sw-tpm2: Fix build on RISC-V --- pkgs/tools/security/ibm-sw-tpm2/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/ibm-sw-tpm2/default.nix b/pkgs/tools/security/ibm-sw-tpm2/default.nix index d556566a7d5..c5b738678aa 100644 --- a/pkgs/tools/security/ibm-sw-tpm2/default.nix +++ b/pkgs/tools/security/ibm-sw-tpm2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lib, openssl }: +{ stdenv, fetchurl, fetchpatch, lib, openssl }: stdenv.mkDerivation rec { pname = "ibm-sw-tpm2"; @@ -9,6 +9,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-VRRZKK0rJPNL5qDqz5+0kuEODqkZuEKMch+pcOhdYUc="; }; + patches = [ + (fetchpatch { + url = "https://github.com/kgoldman/ibmswtpm2/commit/e6684009aff9c1bad38875e3319c2e02ef791424.patch"; + sha256 = "1flzlri807c88agmpb0w8xvh5f16mmqv86xw4ic4z272iynzd40j"; + }) + ]; + + patchFlags = [ "-p2" ]; + buildInputs = [ openssl ]; sourceRoot = "src";