1 { stdenv, lib, fetchFromGitHub
2 , autoreconfHook, pkg-config, autoconf-archive, makeWrapper, which
7 stdenv.mkDerivation rec {
11 src = fetchFromGitHub {
12 owner = "tpm2-software";
15 sha256 = "sha256-l0ncCMsStaeFACRU3Bt6F1zyiOTGY6wOHewA4AD58Ww=";
26 buildInputs = [ tpm2-tss glib dbus ];
27 nativeCheckInputs = [ cmocka ];
29 enableParallelBuilding = true;
31 # Emulate the required behavior of ./bootstrap in the original
34 echo "${version}" > VERSION
37 # Unit tests are currently broken as the check phase attempts to start a dbus daemon etc.
38 #configureFlags = [ "--enable-unit" ];
41 # Even though tpm2-tss is in the RUNPATH, starting from 2.3.0 abrmd
42 # seems to require the path to the device TCTI (used for accessing
43 # /dev/tpm0) in it's LD_LIBRARY_PATH
45 wrapProgram $out/bin/tpm2-abrmd \
46 --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ tpm2-tss ]}"
50 description = "TPM2 resource manager, accessible via D-Bus";
51 mainProgram = "tpm2-abrmd";
52 homepage = "https://github.com/tpm2-software/tpm2-tools";
53 license = licenses.bsd3;
54 platforms = platforms.linux;
55 maintainers = with maintainers; [ matthiasbeyer ];