summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/security/tpm2-tss-engine/default.nix
blob: f24b8028abbd3b6200791055361254635c059bc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ stdenv
, fetchFromGitHub
, lib
, pkg-config
, makeWrapper
, curl
, openssl
, tpm2-tss
}:

stdenv.mkDerivation rec {
  pname = "tpm2-tss-engine";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "tpm2-software";
    repo = pname;
    rev = "v${version}";
    sha256 = "1pwc38izkk50s73xzcca1l5h265lmh4hcgpfq8lmbv5grq2qdal8";
  };

  nativeBuildInputs = [ pkg-config makeWrapper ];
  buildInputs = [
    curl openssl tpm2-tss
  ];

  #preFixup = let
  #  ldLibraryPath = lib.makeLibraryPath ([
  #    tpm2-tss
  #  ];
  #in ''
  #  for bin in $out/bin/*; do
  #    wrapProgram $bin \
  #      --suffix LD_LIBRARY_PATH : "${ldLibraryPath}"
  #  done
  #'';

  meta = with lib; {
    description = "OpenSSL Engine for TPM2 devices";
    homepage = "tpm2-software.github.io";
    license = licenses.bsd3;
    platforms = platforms.linux;
    maintainers = with maintainers; [ matthiasbeyer ];
  };
}