uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
48
pkgs/tools/security/ibm-sw-tpm2/default.nix
Normal file
48
pkgs/tools/security/ibm-sw-tpm2/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ stdenv, fetchurl, fetchpatch, lib, openssl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ibm-sw-tpm2";
|
||||
version = "1661";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/ibmswtpm2/ibmtpm${version}.tar.gz";
|
||||
sha256 = "sha256-VRRZKK0rJPNL5qDqz5+0kuEODqkZuEKMch+pcOhdYUc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/kgoldman/ibmswtpm2/commit/e6684009aff9c1bad38875e3319c2e02ef791424.patch";
|
||||
sha256 = "1flzlri807c88agmpb0w8xvh5f16mmqv86xw4ic4z272iynzd40j";
|
||||
})
|
||||
];
|
||||
|
||||
patchFlags = [ "-p2" ];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
sourceRoot = "src";
|
||||
|
||||
prePatch = ''
|
||||
# Fix hardcoded path to GCC.
|
||||
substituteInPlace makefile --replace /usr/bin/gcc "${stdenv.cc}/bin/cc"
|
||||
|
||||
# Remove problematic default CFLAGS.
|
||||
substituteInPlace makefile \
|
||||
--replace -Werror "" \
|
||||
--replace -O0 "" \
|
||||
--replace -ggdb ""
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp tpm_server $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "IBM's Software TPM 2.0, an implementation of the TCG TPM 2.0 specification";
|
||||
homepage = "https://sourceforge.net/projects/ibmswtpm2/";
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ delroth ];
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue